Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

msxml3.dll error '80072ee2' in ASP Page

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 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.

like image 913
neojakey Avatar asked Apr 05 '11 23:04

neojakey


2 Answers

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.

like image 200
dva Avatar answered Sep 25 '22 00:09

dva


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.

like image 27
Cheran Shunmugavel Avatar answered Sep 26 '22 00:09

Cheran Shunmugavel