differences between Msxml2.ServerXMLHTTP and WinHttp.WinHttpRequest?

opensas picture opensas · Jul 22, 2009 · Viewed 26.4k times · Source

just when I finally understood the difference between Msxml2.XMLHTTP and 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.

suddenly I find 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.

so, how is this different from Msxml2.ServerXMLHTTP

(well, the implicit question is which one should I use...)

Answer

Samuel Zhang picture Samuel Zhang · Nov 30, 2009

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.