Vikrant Shitole
Vikrant Shitole

Reputation: 514

errors ServerXMLHTTP.send in classic ASP when I am using iis7.5

I have shared hosting which runs iis7.5 .

I wanted to run this code which allows me to display the content of the another url.

<%                
                                      
url = "abc.com"
                        
Response.Write(url)
                        
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") 
xmlhttp.open "GET", url, false 
xmlhttp.send "" 
Response.write xmlhttp.responseText 
set xmlhttp = nothing 

%>  

This code was running perfectly on IIS6, but when I migrate to IIS7 it was giving me error of operation timed out on ' xmlhttp.send "" ' line. It means its unable to establish connection.

Do I need to do some changes in web.config to run this code or Is there any alternative code.

Thanks for your help.

Upvotes: 0

Views: 5715

Answers (3)

Ederico Rocha
Ederico Rocha

Reputation: 21

Had the same issue. It seems MSXML2.ServerXMLHTTP is having problems connecting to it's own site. I solved this problem by creating a new "site" with the same directory but with a different port. When I call MSXML2.ServerXMLHTTP with the different port HTTP://SERVER:PORT/same/path/to/script.asp it works fine.

Upvotes: 2

Tester
Tester

Reputation: 21

Try adding MSXML2.serverXMLHTTP.6.0 or MSXML2.serverXMLHTTP.4.0 depends the version of MSXL installed in your system.

Upvotes: 1

Kev
Kev

Reputation: 119806

Apart from the fact that you're missing the http:// from the url that script works just fine on one of our Windows 2008R2/IIS7.5 servers.

I would check to see if your hoster has blocked outbound port 80 connections either on the server (Windows Firewall or IPSec), or within their shared hosting LAN.

Upvotes: 1

Related Questions