Including files from other Web Server

Results 1 to 2 of 2

Thread: Including files from other Web Server

  1. #1
    Curtis S. Guest

    Default Including files from other Web Server

    At work we have numerous web servers. Lets take a Dominoe, Apache, Websphere, and IIS Server. On the IIS Server we want to use an include statement or some other type of get/request function to display files from the other servers. <BR><BR>Is there a way to do this. I know using the standard IIS include you can only include 1. files from a virtual path using the virtual statment. or 2. files from the existing or subdirectory using the file statment. <BR><BR>Please let me know if there is a way to inlcude files from other servers WITHOUT using frames, layers, or IFrames. <BR><BR>Thanks,<BR><BR>Curt

  2. #2
    Join Date
    Dec 1969

    Default What is a file? What is not?

    Put simply: A URL is *NOT* a file. Not by any of the wildest stretches of imagination.<BR><BR>If you are writing in ASP, then you *SHOULD* be fully aware of this. Some client (which may or may not be a browser!) sends out an HTTP request to a certain &#039;net address (with the site name translated to an IP address via a lookup). The HTTP comes to the Web server, asking for (let us say) "xxx.asp". The Web server has a list of name extensions that it is supposed to do something with. ".asp"? Oh...find the file by that name, process any server-side includes (!!!!), and shove it on out via ISAPI to the ASP dll. The ASP dll then follows the instructions in the .asp file (which may or may not mean sending ONE SINGLE CHARACTER from that file back!) and returns text to the Web server which finally fulfills the HTTP request by sending back a stream of bytes to the client.<BR><BR>Now... WHERE in that process is there *any* possibility of "seeing" a file on some other web server???? Especially since you can&#039;t SEE files on the &#039;net AT can only see URLs!!!<BR><BR>Unless you change how the primary Web server works (regarding server side includes), the only place is inside the ASP dll. And, indeed, you *can* use ASPTear (or other tools) to have your ASP code do an HTTP request of any URL. But now that *other* URL could well go through the same process! The URL does *NOT* have to represent a file! One could easily imagine a custom Web server that doesn&#039;t *HAVE* files associated with the various URLs it offers! In fact, writing such a server is a frequent exercise given to budding Java programmers who are learning &#039;net protocols.<BR><BR>SO WHERE ARE THERE ANY "FILES" AVAILABLE? Answer: No place.<BR><BR>Perhaps the best chance you have would be to get a Web server that comes with source code (meaning almost surely Apache) and modify the source in such away that *your* Web server can do server side includes that use URLs. I will only warn you that this will likely be slower than molasses.<BR><BR>Want a practical solution here?<BR><BR>Use ASPTear. But use it to make *copies* of the contents of various URLs. And keep a cache of the copies on your web site. Look in the cache first and then use the FileSystemObject to read the cached file and write it out as part of your standard ASP output stream. Only *if* the file is not found in the cache do you use ASPTear to go get it...and put it in the cache at the same time, of course.<BR><BR>You could easily write your own version of ASPTear to do this, in such a way that you&#039;d give it the URL, it would look in its own local cache for you, and would only actually do the HTTP request if needed.<BR><BR>NOTE: The *ONLY* way you will be able to include ASP code from another server, though, is to pull the "modify the web server" trick. That&#039;s because *only* by using a server-side include can you produce input to the ASP dll. In all other cases, the file/url is strictly data to the ASP code, not program.<BR><BR>[ Exception: You *could* use ASP code to generate, on the fly, a new .asp file...and then use Response.Redirect to execute that file. To say that this would be slow is...well, an understatement. But, then, most everything I talked about here would be pretty darned slow! ]<BR><BR>In short: Solve the problem a different way. Put all your servers on the same LAN and use server-side includes with *files* off the LAN. Forget using URLs.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts