PRB: Loading Remote XML or Sending XML HTTP Requests from Server Is Not Supported

ID: Q237906


The information in this article applies to:
  • Microsoft Internet Explorer (Programming) version 5


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.


RESOLUTION

Replace XMLHTTP request code on the server with an alternative that does not rely on URLMON or WININET, such as the WINSOCK control that ships with Visual Basic.


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.


REFERENCES

XMLHttpRequest Object Documentation

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:

Q188955 HOWTO: Use Internet Transfer Control in ASP or in WSH Script
Q216288 PRB: Using the Internet Transfer Control on an ASP Page

© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Jason Strayer, Microsoft Corporation

Additional query words:

Keywords : kbGrpInet kbIE500 kbXML kbDSupport kbIEFAQ
Version : WINDOWS:5
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: February 1, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.