homepage Welcome to WebmasterWorld Guest from 107.22.78.233
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
Can you include a file from a different server (ie Domain)?
kristibweb




msg:955466
 10:14 pm on Mar 2, 2004 (gmt 0)

I am trying to utilize files from a different server (domain1) on a new site (domain2). Can you use these files as includes from one server to another? Like:
<!--#include file = "http://www.domain1.com/includes/somefile.asp"-->

I know what the obvious solution would be and that is to copy the files from one server to the other and use from there, but there is a method to my madness and would prefer to leave them on the original server.

Thanks for your help!
Kristib

 

WebJoe




msg:955467
 10:24 pm on Mar 2, 2004 (gmt 0)

AFAIK that's not possible

defanjos




msg:955468
 10:25 pm on Mar 2, 2004 (gmt 0)

You can try an ASP component like ASPtear (free, I believe)

MrSpeed




msg:955469
 2:33 am on Mar 3, 2004 (gmt 0)

Do a search on google for "xmlhttp"

It should do the trick for you.

aspdaddy




msg:955470
 12:20 pm on Mar 3, 2004 (gmt 0)

Re asptear/xmlhttp

Can page scraping actually include asp code to execute? I though it just captured the page content as string.

If it was possible it would be very worrying...

MrSpeed




msg:955471
 3:55 pm on Mar 3, 2004 (gmt 0)

You can only fetch the rendered output, not the ASP code.

macrost




msg:955472
 5:48 pm on Mar 3, 2004 (gmt 0)

MrSpeed is correct, it will only get the rendered page output, not the actual code. Using xmlhttp is pretty neat especially if used within an application to get another page output from a different directory. Heck, you can even have all your variables in a single xml file and pull the variables that you want to be used in the page.

Mac

ebouwsema




msg:955473
 10:37 pm on Mar 3, 2004 (gmt 0)

You can do it, using both XMLHTTP and the VBscript Execute statement. I wouldn't recommend it though as it creates substantial security risks.

A few links to get you started:
[4guysfromrolla.com ]
[msdn.microsoft.com ]
[4guysfromrolla.com ]

Also, for security, maybe do a hash or something similar on the code to ensure that when you receive the file it's the same as when it was sent.

Regards,
Eric

MrSpeed




msg:955474
 3:00 am on Mar 4, 2004 (gmt 0)

ebouwsema-
Do you mean you can execute ASP code remotely with the VBscript Execute statement? From what I understood in the articles you can simulate server.transfer and execute on the same machine.

ebouwsema




msg:955475
 3:39 am on Mar 4, 2004 (gmt 0)

Mr. Speed,

The flow would work as follows:

  • Use the XMLHTTP object to retrieve the code from the remote server
  • Store the code in a string variable on the local server
  • Run the code from the string variable using the VBScript Execute statement, similar to as specified in the article above

    Note: the code on the remote server would have to use an extension other than ".asp" if the server is running IIS and it is setup to process the ASP files before outputting.

    Again I'd be quite concerned in regards to the security of using this method, the files would be easy to alter in transmission.

    I hope this answers your question.

    Eric

  • Global Options:
     top home search open messages active posts  
     

    Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
    rss feed

    All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
    Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
    WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
    © Webmaster World 1996-2014 all rights reserved