开发者

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

开发者 https://www.devze.com 2023-03-28 18:12 出处:网络
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.

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 cod开发者_如何学Pythone or Is there any alternative code.

Thanks for your help.


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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消