Include file from other server

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

Is it possible to include a file from another server in html? I have
typed

<!-- #include file="http://Nlg-info/PESE/PESE.asp" --> is this the
correct code?

I cannot have the files together as we are developing in asp.net while
the intranet server does not have the framework loaded.

Many Thanks, Rick Anderson
 
Rick,

What exactly do you mean by "include" in this context? Do you want to
execute the server-side code from this foreign page on your server or do you
want the client-side content of the foreign page to appear within a page of
your application?

Nicole
 
Nicole, Thanks for the reply.

I am trying to do the first of your two choices. I got the following
suggestion from another user:

-------START
What you're doing won't work.

You have to use the fully qualified share name to identify the
location of the server, not the http location. For example:

This doesn't work:
#include file="http://www.mysite.com/myinclude.asp"

This will work:
#include file="\\thesharename\myinclude.asp"

In this case the server needs to be visible to your computer.
------END

When I tried this I got the following error:
Active Server Pages error 'ASP 0130'
Invalid File attribute
/information/Search.asp, line 2
File attribute '\\pese\pese.asp' cannot start with forward slash or
back slash.

So not really sure what to do. Rick.
 
Rick,

Is there any reason you can't store a copy of the file locally on the server
that is hosting your ASP.NET application? It will be processed there
regardless of whether it's loaded from a local or a network source. If this
isn't feasible, have you at least tested it in this configuration to ensure
that the ASP file can actually be used within your ASP.NET page in this way?

HTH,
Nicole
 
Back
Top