Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include a file from a different server 1

Status
Not open for further replies.

stritec

Programmer
Oct 23, 2000
9
0
0
US
Is there a way to inlcude a file such as text.html from serverOne in a file such as doingInclude.asp from ServerTwo? I want to do this without using frames if possible, or IFrames for that matter.

Thanks,

Curtis
 
<!-- #include file=&quot; -->

Was the first thing that I tried. I thought it would work but it doesn't. I was looking up #include file= in a script reference and it says that it has to be in the current directory or a sub directory for this to work. Now you can get around it if you have Parent Directories enabled you can get to parent directories by using ../../../text.html and go all the way back to the C: drive or as far back as you can. If there any other way or something you would have to turn on at the server to allow the

<!-- #include file=&quot; -->


to work. I can't seem to get it to work.

Thanks,

Curt
 
hmmmm... No, I don't suppose I know of any other way to do an include --

A solution might be just to get the page and put it on your server so that you can use the #include ...

Anyone else know of a way to get it to work?

 
Don't know if there's a better way, but this should work I suppose:

Go to serverOne and share the subfolder where text.html is. Then on serverTwo, what you need to do (and this is where it gets fuzzy for me) is to create a subfolder to your app, go to IIS, point to that folder and do a properties on it, then tell IIS that it comes from a share located on another computer (that should be on the first tab of the IIS properties window that comes up). Without doing it myself, I can't recall (and I am at home so I can't try it), but you may have to set up a virtual directory, just don't remember. I THINK that if you go to IIS on serverTwo and setup a virtual directory pointing to the share on serverOne, you don't actually create a real folder on serverTwo (through windows explorer).

But that's the basic idea - you have a folder (virtual or otherwise) on serverTwo that points to the share on serverOne where the text.html resides.
 
Curtis,

did you try this?

<!-- #include VIRTUAL=&quot; -->

Useing the VIRTUAL command-part and not the FILE part?
From what I've heard, file uses within it's own directory, and virtual goes outside of it. Try it, it just might work...I'm not on my computer right now, so I don't wish to try it right now. But should do the trick.

-Ovatvvon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top