asp-classic - ASP页面中的msxml3.dll错误 '80072ee2'

标签 asp-classic serverxmlhttp

我们刚刚移到了具有Windows 2008和SQL Server 2008的新专用服务器上。我正在尝试使用Server.CreateObject("MSXML2.ServerXMLHTTP")访问同一服务器上的ASP页。

在我们以前的2003服务器上,此操作正常进行,但是对于新的2008服务器,该操作只是超时。

这是代码:

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

代码很简单,但出现以下错误:

msxml3.dll error '80072ee2'

The operation timed out

/handle404.asp, line 291 

第291行引用了oXMLHttp.Send()行。

我可以使用其他代码吗?我在服务器上的其他位置使用脚本来访问其他服务器上的文件,它们可以正常工作,但是对我们服务器上文件的任何访问均不起作用。

是否有其他方法可以让我在浏览器中保持URL完整?这个人可以在他们的浏览器中写URL:http://www.example.com/hello该文件不存在,但是我有一个404处理程序,该处理程序随后将用户指向正确的路径,而无需更改浏览器URL,这对于我们的SEO评级至关重要。

最佳答案

Microsoft已发布了一个名为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.



至于替代方案,这取决于您收到响应后对响应的处理方式。如果脚本的全部目的是将请求转发到profile_view.asp,则可以改为使用 Server.Transfer

关于asp-classic - ASP页面中的msxml3.dll错误 '80072ee2',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5559722/

相关文章:

asp.net - 如何在Visual Studio 2013中允许父路径?

asp-classic - 基于ASP的网站和表单的错误处理

jquery - 版本变更jquery错误

httpwebrequest - Msxml2.ServerXMLHTTP 和 WinHttp.WinHttpRequest 之间的区别?

asp-classic - 在经典asp中将utf-8转换为iso-8859-1

delphi - MSXML/ServerXmlHttp POST 间歇性失败 (Delphi)

mysql - ASP -> SQL 递增值

asp.net - 为什么 ASP.NET 比 ASP Classic 更安全?

delphi - MSXML2.ServerXMLHTTP 与 BSTR 的后期绑定(bind) "send"方法失败,并显示 "the parameter is incorrect"

asp-classic - 为 ServerXMLHTTP 请求设置超时