PRB: Loading Remote XML or Sending XML HTTP Requests from Server Is Not Supported (237906)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 5
This article was previously published under Q237906 SYMPTOMS
Active Server Pages (ASP) script or Internet Server API (ISAPI) code that attempts to use XMLHttpRequest (Microsoft.XMLHTTP) functionality of the Microsoft XML engine (MSXML) to send XML requests to another Web server may function incorrectly or perform poorly.
Also, you'll experience similar behavior if you attempt to load XML documents from other servers by supplying a URL to the XMLDOMDocument load method.
CAUSE
The XMLHttpRequest support in MSXML and the load method, when using a remote URL, sends HTTP requests using the Internet Explorer URLMON and WININET components. These components were designed and tested only to be used from a client machine in a regular user process. The IIS and ASP system runs in a protected server service that imposes performance and security constraints on server applications that breaks some of the functionality of URLMON and WININET.
STATUS
This behavior is by design.
MORE INFORMATION
The XMLHttpRequest object (the IXMLHttpRequest interface in C++) is used to both send XML requests to a Web server and return XML responses from the Web server back to the client. A client machine initiates a request to the server by creating an instance of the XMLHttpRequest object and then calling the open and send methods. When the readyState property transitions to COMPLETE, the server has returned a response that can be retrieved on the client through one of the response methods, such as responseBody.
The server, typically in an ASP script page, handles XML HTTP requests by creating an instance of an XMLDOMDocument object and loading it with the ASP Request object. The server then returns response data to the client as with ordinary HTTP requests.
This is the standard usage of the XMLHttpRequest object. Using Microsoft.XMLHTTP object from within the ASP script page on the server to send requests to other Web servers is not supported and leads to a number of unanticipated problems such as inability to connect to SSL (HTTPS) servers or performance degradation in the server process.
NOTE: While this article mainly describes the use of XMLHttpRequest from ASP or ISAPI code, this problem applies to any server-to-server usage of XMLHttpRequest from any kind of codebase. At the most basic level, there is no currently supported method to send HTTP-based requests between HTTP servers and any technique, XMLHttpRequest or otherwise. You must only send HTTP-based requests from a user-based client computer to a server.
The only supported method for making HTTP requests from server-side ASP script is if you use ServerXMLHTTP object (MSXML2.ServerXMLHTTP) that is provided with XML 3.0 or later.
REFERENCES
For more information, see the following Microsoft Web site:
Modification Type: | Major | Last Reviewed: | 10/12/2001 |
---|
Keywords: | kbDSupport kbFAQ kbMSXMLnosweep kbprb KB237906 |
---|
|