MSXML2.ServerXMLHTTP问题,从服务器2003 / IIS6移到2008 / IIS7,ASP页面之间简单的xml破解 [英] MSXML2.ServerXMLHTTP problem, moved from server 2003/IIS6 to 2008/IIS7, simple xml between ASP pages broken

查看:69
本文介绍了MSXML2.ServerXMLHTTP问题,从服务器2003 / IIS6移到2008 / IIS7,ASP页面之间简单的xml破解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最终更新>>>

Final update>>>

更新:我将目标移动到生产服务器/网址并且工作正常(从新服务器调用,生产目标)  所以我逆转了(从生产服务器调用并在新服务器上调用目标),它也有效。 因此,使用MSXML2.ServerXMLHTTP与同一服务器上的另一个ASP脚本通信的ASP脚本似乎存在
问题,至少在服务器2008 / IIS7中。 适用于Server 2003 / IIS6。 奇怪的倒退,在我看来,哦,好吧。 也许这篇帖子
可以帮助其他人。

Update: I moved the target to the production server/URL and it works fine(calling from new server, target on production).  So I reversed(calling from production server and target on new server) and it works too.  So it would appear that there is an issue with an ASP script using MSXML2.ServerXMLHTTP to comm with another ASP script on the same server, atleast in server 2008/IIS7.  Works fine with Server 2003/IIS6.  Strange step backwards it would seem to me, oh well.  Perhaps this post here will help someone else.

 

首次更新>>>

First update>>>

好了,做了一些,只读了这个:

Well, done some more and just read this:

...calls to ServerXMLHTTP must not send requests


to the same virtual server on which the calling script is executing,


correct? IOW, the script http://www.myserver.com/xmlhttpcaller.asp must not


reference any other ASP script on www.myserver.com when calling XMLHTTP.


Doing so can deadlock the script engine.





Even calling an XML source on a different virtual but same physical server


can cause issues, depending on app pools, isolation settings, threading


models of COM objects being used, etc. ...

 

如果这是准确的,似乎这可能是我遇到的问题的根本问题。 如果是这样,我发现很奇怪它在当前的生产服务器上从来都不是问题,但如果是这样,我会做出适当的更改。 有人对以上信息专门评论
吗?

If this is accurate it would seem that this may be the underlying issue with the problem I am having.  If so, I find it curious it has never been a problem on the current production server but if so I will make appropriate changes.  Anyone comment specifically on this info above?

 

原始帖子>>>

original post>>>

我已经在网上看了几个小时,但很少有人为它展示。 发生了什么的基本要点:  ASP页面尝试将XML转换到同一目录中的另一个ASP页面。 以下代码会停留30秒并超时。 实际上它在30秒的*结束*的目标页面上获得
(测试电子邮件从那里发送时间戳)但没有返回响应。  Get方法确实解析了查询字符串,但切换到在目标页面上使用post和no data。 
目标网页无法回复启动页面。 如上所述,这在运行Server 2003的当前服务器上运行正常。 我已经完成了角色,proxycfg(与当前服务器一样直接访问),它是在同一目录中调用页面的页面。 
在IIS管理器中,我已将ISAPI限制设置为允许c:\windows \ system32 \msxml3.dll。 我已经启动了WinHttpAutoProxySvc。  也许我需要安装或运行服务的特定功能或...?

I've read hours online about this but have very little to show for it.  Basic gist of what's happening:  ASP page trying to XML to another ASP page in the same dir.  Following code sits for 30 seconds and times out.  It actually gets to the target page at the *end* of the 30 seconds(test email with time-stamp being sent from there) but no response returned.  Get method does resolve the querystring but switch to using post and no data at the target page.  No response from the target page gets back to initiating page.  As stated, this works fine on the current server running Server 2003.  I've gone through roles, proxycfg(direct access as with the current server), it's a page calling a page in the same directory.  In the IIS manager I have set the ISAPI restrictions to allowed for c:\windows\system32\msxml3.dll.  I have started WinHttpAutoProxySvc.   Perhaps a specific feature I need to install or a service to run or...?

错误:

msxml3.dll
error'80072ee2'

操作超时

/ testXML_2.asp
,第26行



第26行是xml.send行

 

正在测试简单代码以使xml在新服务器上运行(testXML_2.asp) :

Simple code being tested to get the xml working on the new server(testXML_2.asp):

IF UCASE(Request.ServerVariables(" HTTPS"))=" ON&qu​​ot;然后是
    vWork2 = cfgURLBaseSecure& cfgURLDir

ELSE

    vWork2 = cfgURLBase& cfgURLDir

END IF



vXMLAdr = vWork2& " /testXML.asp"

vXMLStr ="?EC = E1234567890"
$


SET xml = Server.CreateObject(" MSXML2 .ServerXMLHTTP")



vWork = vXMLAdr& vXMLStr

xml.open" GET",vWork,FALSE

xml.send



'xml。 open" POST",vXMLAdr,FALSE

'xml.send vXMLStr



IF xml.status = 200 THEN

    vReturn = xml.responseText

ELSE

    vReturn =" FAIL"

END IF

IF UCASE(Request.ServerVariables("HTTPS")) = "ON" THEN
    vWork2 = cfgURLBaseSecure & cfgURLDir
ELSE
    vWork2 = cfgURLBase & cfgURLDir
END IF

vXMLAdr = vWork2 & "/testXML.asp"
vXMLStr = "?EC=E1234567890"

SET xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

vWork = vXMLAdr & vXMLStr
xml.open "GET", vWork, FALSE
xml.send

'xml.open "POST", vXMLAdr, FALSE
'xml.send vXMLStr

IF xml.status = 200 THEN
    vReturn = xml.responseText
ELSE
    vReturn = "FAIL"
END IF

 

 

目标页面代码(testXML.asp):

Target page code(testXML.asp):

vWork2 = Request.QueryString(" EC")

'vWork3 = Request.form(" ; EC")



vWork =" testXML - Time:" &安培;现在()& "  querystring:" &安培; vWork2& "  形式:" &安培; vWork3

CALL SendErrorEmail(" testXML - new",vWork,"")



Response.Write"Got There and返回"
$
Response.end

vWork2 = Request.QueryString("EC")
'vWork3 = Request.form("EC")

vWork = "testXML - Time: " & now() & "  querystring: " & vWork2 & "   form: " & vWork3
CALL SendErrorEmail("testXML - new",vWork,"")

Response.Write "Got There and Back"
Response.end

 

一个ASP页面使用XML对象联系的原因另一个是目标的主要用途是AJAX与其他页面,但有时系统需要执行相同的功能,因此这种通过系统与
a用户通过浏览器与AJAX页面交互的方法,我宁愿保持代码在一个地方。 也许有一个替代我应该考虑,但上面的情况已经生产好多年了。

The reason the one ASP page is using the XML object to contact another is the main use of the target is AJAX with other pages but sometimes the system needs to perform the same function thus this method of interacting with the AJAX page via the system vs a user via a browser and I would prefer to keep the code in one place.  Perhaps there is an alternate I should be considering but the above scenario has been in production just fine for years now.

任何帮助?

谢谢提前,

推荐答案

有关于Windows Server 2008上WinHttp注册的知识问题,正如所讨论的那样@

http://stackoverflow.com/questions/1639658/do-i-really-need-to-register-winhttp-on-windows-server-2008-before-using-winhttpr
。 ServerXmlHttp只是利用WinHttp进行数据传输。所以我个人希望send Server运行失败无论如何对Windows Server 2008中的ServerXMLHTTP
都是失败的,除非你手动注册了WinHttp ...
There is a knonw issue about WinHttp registration on Windows Server 2008, as discussed @ http://stackoverflow.com/questions/1639658/do-i-really-need-to-register-winhttp-on-windows-server-2008-before-using-winhttpr. ServerXmlHttp just leverages WinHttp for data transfer. So I personally would expect send() operation fail anyhow for ServerXMLHTTP in Windows Server 2008 unless you have registered WinHttp manually...


这篇关于MSXML2.ServerXMLHTTP问题,从服务器2003 / IIS6移到2008 / IIS7,ASP页面之间简单的xml破解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆