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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve page content with XMLHTPP

Status
Not open for further replies.

fayna

Programmer
Jan 14, 2002
35
ES
Hi,
I'm trying to retrieve an ASP page content but I have the following problem: when I run the code bellow on my computer's server it works without any errors, but when I run it on my company's server I get an 404 - File not found error. Where's the problem?

Here's the code:
<%
option explicit
Response.Buffer = True


Dim RefPage, objXMLHTTP, RegEx

RefPage = Request.QueryString("ref")
set objXMLHTTP = server.CreateObject"MSXML2.ServerXMLHTTP")

RefPage = Request.ServerVariables("HTTP_REFERER")
objXMLHTTP.Open "GET", RefPage, false
objXMLHTTP.send
response.Write("ESTADO: " & objXMLHTTP.status)
Response.Write objXMLHTTP.responseText
Set objXMLHTTP = Nothing
%>


Thanks
Fayna
 
Hi DNG, I think it could be behind a firewall.
 
Many firewalls are configured to only allow web access to certain user accounts or IP addresses.

Unless you have changed the IIS security, the web server will run your ASP in the security context of the local IUSR_MachineName[/u] account... This local account is not on your domain so your firewall might not let it through...

Considering that the code above works on a different network, the problem is probably with the network configuration or security.
 
Bleh...

The local account is IUSR_MachineName ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top