just when I finally understood the difference between Msxml2.XMLHTTP and Msxml2.ServerXMLHTTP
就在我终于理解了Msxml2.XMLHTTP和Msxml2.ServerXMLHTTP之间的区别时
http://support.microsoft.com/kb/290761
XMLHTTP is designed for client applications and relies on URLMon, which is built upon Microsoft Win32 Internet (WinInet). ServerXMLHTTP is designed for server applications and relies on a new HTTP client stack, WinHTTP. ServerXMLHTTP offers reliability and security and is server-safe. For more information, see the MSXML Software Development Kit (SDK) documentation.
XMLHTTP专为客户端应用程序而设计,依赖于基于Microsoft Win32 Internet(WinInet)构建的URLMon。 ServerXMLHTTP专为服务器应用程序而设计,依赖于新的HTTP客户端堆栈WinHTTP。 ServerXMLHTTP提供可靠性和安全性,并且是服务器安全的。有关更多信息,请参阅MSXML软件开发工具包(SDK)文档。
suddenly I find WinHttp.WinHttpRequest...
我突然发现WinHttp.WinHttpRequest ......
http://msdn.microsoft.com/en-us/library/aa382925(VS.85).aspx
Microsoft Windows HTTP Services (WinHTTP) provides developers with a server-supported, high-level interface to the HTTP/1.1 Internet protocol. WinHTTP is designed to be used primarily in server-based scenarios by server applications that communicate with HTTP servers.
Microsoft Windows HTTP服务(WinHTTP)为开发人员提供了HTTP / 1.1 Internet协议的服务器支持的高级接口。 WinHTTP主要用于与HTTP服务器通信的服务器应用程序,主要用于基于服务器的方案。
so, how is this different from Msxml2.ServerXMLHTTP
那么,这与Msxml2.ServerXMLHTTP有何不同?
(well, the implicit question is which one should I use...)
(好吧,隐含的问题是我应该使用哪一个...)
3 个解决方案
#1
Msxml2.XMLHTTP and Msxml2.ServerXMLHTTP are two components share the similar interface for fetching XML files over HTTP protocal. The former is built upon URLMon, which relies on WinINet. The later is built upon WinHTTP, which is a server friendly replacement for WinINet. To put it simple - ServerXMLHTTP = XML + WinHTTP.
Msxml2.XMLHTTP和Msxml2.ServerXMLHTTP是两个组件共享类似的接口,用于通过HTTP协议获取XML文件。前者建立在URLMon上,后者依赖于WinINet。后者基于WinHTTP构建,WinHTTP是WinINet的服务器友好替代品。简单来说 - ServerXMLHTTP = XML + WinHTTP。
#2
Similarly a recent application has found me asking similar questions, however after performing some rudimentary research I have simplified as follows:
同样,最近的一个应用程序发现我提出了类似的问题,但是在进行了一些初步的研究后,我简化如下:
WinHTTP :: high-level interface to the HTTP/1.1 Internet protocol
WinHTTP :: HTTP / 1.1 Internet协议的高级接口
ServerXMLHTTP :: ServerXMLHTTP is recommended for server applications and XMLHTTP is recommended for client applications
ServerXMLHTTP :: ServerXMLHTTP建议用于服务器应用程序,建议XMLHTTP用于客户端应用程序
Depends what you are doing and how much control you require.
取决于你在做什么以及你需要多少控制。
Explicitly denied elements of ServerXMLHTTP often cause some developers annoyances as it requires a little more 'work' to implement effectively. The helping-hand with the explicitly allowed WinHTTP and XMLHTTP objects is not there with ServerXMLHTTP.
显然被拒绝的ServerXMLHTTP元素经常会引起一些开发人员的烦恼,因为它需要更多的“工作”才能有效实施。 ServerXMLHTTP不支持使用明确允许的WinHTTP和XMLHTTP对象。
If your solution requires elements of Enterprise up-scaling, out-scaling then perhaps choose appropriately.
如果您的解决方案需要企业扩展的元素,那么可能需要适当选择。
#3
We were using both of these components in classic ASP web applications. There were called a LOT of times every minute, from server to server asp server-side page calling another asp or aspx server-side page).
我们在经典的ASP Web应用程序中使用了这两个组件。每分钟都会调用很多次,从服务器到服务器的asp服务器端页面调用另一个asp或aspx服务器端页面)。
Server.CreateObject("WinHttp.WinHttpRequest.5.1")
Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
Our experience is that WinHttpRequest is stable, the other is not. We had to remove all our createobject to serverxmlhttp and replace them by winhttprequest, because after a while, it was taking lot of memory, was freezing, or the iis application pool did not respond or became very slow.
我们的经验是WinHttpRequest稳定,另一个不稳定。我们必须将所有的createobject删除到serverxmlhttp并用winhttprequest替换它们,因为过了一段时间,它占用了大量内存,冻结了,或者iis应用程序池没有响应或变得非常慢。
I don't know the detailed specifications of each components, but I can assure you that, from our experience, "MSXML2.ServerXMLHTTP.6.0" is the one to use.
我不知道每个组件的详细规格,但我可以向您保证,根据我们的经验,“MSXML2.ServerXMLHTTP.6.0”是可以使用的。
#1
Msxml2.XMLHTTP and Msxml2.ServerXMLHTTP are two components share the similar interface for fetching XML files over HTTP protocal. The former is built upon URLMon, which relies on WinINet. The later is built upon WinHTTP, which is a server friendly replacement for WinINet. To put it simple - ServerXMLHTTP = XML + WinHTTP.
Msxml2.XMLHTTP和Msxml2.ServerXMLHTTP是两个组件共享类似的接口,用于通过HTTP协议获取XML文件。前者建立在URLMon上,后者依赖于WinINet。后者基于WinHTTP构建,WinHTTP是WinINet的服务器友好替代品。简单来说 - ServerXMLHTTP = XML + WinHTTP。
#2
Similarly a recent application has found me asking similar questions, however after performing some rudimentary research I have simplified as follows:
同样,最近的一个应用程序发现我提出了类似的问题,但是在进行了一些初步的研究后,我简化如下:
WinHTTP :: high-level interface to the HTTP/1.1 Internet protocol
WinHTTP :: HTTP / 1.1 Internet协议的高级接口
ServerXMLHTTP :: ServerXMLHTTP is recommended for server applications and XMLHTTP is recommended for client applications
ServerXMLHTTP :: ServerXMLHTTP建议用于服务器应用程序,建议XMLHTTP用于客户端应用程序
Depends what you are doing and how much control you require.
取决于你在做什么以及你需要多少控制。
Explicitly denied elements of ServerXMLHTTP often cause some developers annoyances as it requires a little more 'work' to implement effectively. The helping-hand with the explicitly allowed WinHTTP and XMLHTTP objects is not there with ServerXMLHTTP.
显然被拒绝的ServerXMLHTTP元素经常会引起一些开发人员的烦恼,因为它需要更多的“工作”才能有效实施。 ServerXMLHTTP不支持使用明确允许的WinHTTP和XMLHTTP对象。
If your solution requires elements of Enterprise up-scaling, out-scaling then perhaps choose appropriately.
如果您的解决方案需要企业扩展的元素,那么可能需要适当选择。
#3
We were using both of these components in classic ASP web applications. There were called a LOT of times every minute, from server to server asp server-side page calling another asp or aspx server-side page).
我们在经典的ASP Web应用程序中使用了这两个组件。每分钟都会调用很多次,从服务器到服务器的asp服务器端页面调用另一个asp或aspx服务器端页面)。
Server.CreateObject("WinHttp.WinHttpRequest.5.1")
Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
Our experience is that WinHttpRequest is stable, the other is not. We had to remove all our createobject to serverxmlhttp and replace them by winhttprequest, because after a while, it was taking lot of memory, was freezing, or the iis application pool did not respond or became very slow.
我们的经验是WinHttpRequest稳定,另一个不稳定。我们必须将所有的createobject删除到serverxmlhttp并用winhttprequest替换它们,因为过了一段时间,它占用了大量内存,冻结了,或者iis应用程序池没有响应或变得非常慢。
I don't know the detailed specifications of each components, but I can assure you that, from our experience, "MSXML2.ServerXMLHTTP.6.0" is the one to use.
我不知道每个组件的详细规格,但我可以向您保证,根据我们的经验,“MSXML2.ServerXMLHTTP.6.0”是可以使用的。