开发者

msxml3.dll error '80072ee2' in ASP Page

开发者 https://www.devze.com 2023-02-22 02:38 出处:网络
We have just moved to a new dedicated server that has Windows 2008 and SQL Server 2008.I am trying to access an ASP page on the same server using Server.CreateObject(\"MSXML2.ServerXMLHTTP\").

We have just moved to a new dedicated server that has Windows 2008 and SQL Server 2008. I am trying to access an ASP page on the same server using Server.CreateObject("MSXML2.ServerXMLHTTP").

On our previous 2003 server this worked correctly, however with the new 2008 server the operation just times out.

Here is the code:

strURL = "http://www.storeboard.com/profile/profile_view.asp?MemberID=" & MemberID & "&sid=" & cSession.SessionID
Set oXMLHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
oXMLHttp.open "GET", strURL, false
oXMLHttp.send()
IF oXMLHttp.status = 200 THEN 
  strOut = oXMLHttp.responseText
ELSE
  strOut  = "Could not get XML data."
END IF
Set oXMLHttp = nothing

The code is very simple but I get the following error:

msxml3.dll error '80072ee2'

The operation timed out

/handle404.asp, line 291 

Line 291 refers to oXMLHttp.Send() line.

Is there an alternative code I can use? I use the script other开发者_JS百科 places on the server that access files on other servers and they work correctly, but any access to files on our server doesn't work.

Is there an alternative method that will allow me to keep the URL intact in the browser? The person could write the URL in their browser: http://www.example.com/hello the file doesn't exist but I have a 404 handler that then points the user to the correct path without changing the browser URL which is essential for our SEO ratings.


Microsoft has a published a KB article entitled INFO: Do Not Send ServerXMLHTTP or WinHTTP Requests to the Same Server

If the ServerXMLHTTP or WinHTTP component must send a request to another ASP on the same server, the target ASP must be located in a different virtual directory and set to run in high isolation. Avoid using ServerXMLHTTP or WinHTTP to send a request to an ASP that is located in the same virtual directory.

...

A finite number of worker threads (in the Inetinfo.exe or Dllhost.exe process) is available to execute ASP pages. If all of the ASP worker threads send HTTP requests back to the same Inetinfo.exe or Dllhost.exe process on the server from which the requests are sent, the Inetinfo.exe or Dllhost.exe process may deadlock or stop responding (hang), because the pool of worker threads to process the incoming requests will be exhausted. This is by design.

As far as alternatives go, it depends on what you're doing with the response after you receive it. If the entire purpose of the script is to forward the request to profile_view.asp, you might be able to use Server.Transfer instead.


I had this same issue. In my case the web request I was trying to make was an internal site url (within the same app pool). With server side debugging set to enabled, the asp app pool seems to be restricted to a single worker thread. By disabling this feature, the request was then able to be processed.


msxml3.dll is pretty old. It was distributed with Internet Explorer 6 to give you a rough idea.

Can you have someone install a later version on the server?

http://support.microsoft.com/kb/269238 gives you a list of versions to send to whoever it responsible for the server.

If the problem is genuinely down to a time out you could look into switching ASP buffering off. (This based soley on a guess that if the server object started to receive a response it would hold off on the timeout front.

Alternatively you coudl try processing the value on the client side, below is a function from some code I wrote which does this....

function getDets(RateID) {
    var xmlHttp;
    try {
        xmlHttp=new XMLHttpRequest();    // Firefox, Opera 8.0+, Safari
    }
    catch (e) {
        try {
        // Internet Explorer
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e) {
            try {
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e) {
                alert("Your browser does not support AJAX!");
                return false;
            }
        }
    }
    xmlHttp.onreadystatechange=function()
    {
        if(xmlHttp.readyState==4) {
        var str;
        var newStr;
        str=xmlHttp.responseText
        newStr=str.split("|");
        window.document.all.OR2.style.display="block";
        window.document.all.OR3.style.display="block";    
        window.document.OvertimeRates.Description.value=newStr[0];
        window.document.OvertimeRates.Factor.value=newStr[1];
        }
    }
    if (RateID==0) {
        window.document.OvertimeRates.Description.value="";
        window.document.OvertimeRates.Factor.value="";
    }
    else {
        xmlHttp.open("GET","GetOvertimeRate.asp?RateID="+RateID,true);
        xmlHttp.send(null);
    }
}

Good luck!

0

精彩评论

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