msxml3.dll 错误 '80072ee2'在 ASP 页面中

发布于 2024-10-30 00:25:11 字数 1147 浏览 5 评论 0原文

我们刚刚转移到一台装有 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 评级至关重要。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

神经大条 2024-11-06 00:25:11

Microsoft 发布了一篇知识库文章,标题为信息:不要将 ServerXMLHTTP 或 WinHTTP 请求发送到同一服务器

如果 ServerXMLHTTP 或 WinHTTP 组件必须将请求发送到
同一服务器上的另一个 ASP,目标 ASP 必须位于
不同的虚拟目录并设置为在高度隔离下运行。避免
使用 ServerXMLHTTP 或 WinHTTP 向 ASP 发送请求
位于同一个虚拟目录中。

...

有限数量的工作线程(在 Inetinfo.exe 或 Dllhost.exe 中)
process) 可用于执行 ASP 页面。如果所有 ASP 工作人员
线程将 HTTP 请求发送回同一个 Inetinfo.exe 或
发送请求的服务器上的 Dllhost.exe 进程,
Inetinfo.exe 或 Dllhost.exe 进程可能死锁或停止
响应(挂起),因为工作线程池处理
传入的请求将被耗尽。这是设计使然。

就替代方案而言,这取决于您收到响应后如何处理。如果脚本的全部目的是将请求转发到 profile_view.asp,您也许可以使用 Server.Transfer 代替。

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.

不必你懂 2024-11-06 00:25:11

我也有同样的问题。就我而言,我尝试发出的网络请求是内部站点 URL(在同一应用程序池内)。当服务器端调试设置为启用时,asp 应用程序池似乎仅限于单个工作线程。通过禁用此功能,请求就可以得到处理。

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.

随风而去 2024-11-06 00:25:11

msxml3.dll 已经很旧了。它随 Internet Explorer 6 一起分发,以便为您提供一个粗略的了解。

您可以让人在服务器上安装更高版本吗?

http://support.microsoft.com/kb/269238 为您提供要发送的版本列表给负责服务器的任何人。

如果问题确实是由于超时,您可以考虑关闭 ASP 缓冲。 (这仅基于猜测,如果服务器对象开始接收响应,它将在超时前推迟。

或者,您可以尝试在客户端处理该值,下面是我编写的一些代码中的一个函数,它执行此操作....

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);
    }
}

祝你好运!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文