Data Is Not Posted Correctly by Using XMLHTTP to Send Multiple Asynchronous POSTs (311730)
The information in this article applies to:
- Microsoft Internet Explorer version 6 for Windows XP
- Microsoft Internet Explorer version 6 for Windows 2000
- Microsoft Internet Explorer version 6 for Windows NT 4.0
- Microsoft Internet Explorer version 6 for Windows Millennium Edition
- Microsoft Internet Explorer version 6 for Windows 98 Second Edition
- Microsoft Internet Explorer version 6 for Windows 98
This article was previously published under Q311730 SYMPTOMS
If you use XMLHTTP to send multiple POSTs asynchronously to a Web server that is configured to use basic authentication, some data may not be posted correctly. The following code sample (JavaScript) demonstrates the problem:
xmlhttp1=new ActiveXObject("MSXML2.XMLHttp.3.0");
xmlhttp1.open("POST","http://server/testpost.asp",true);
xmlhttp2=new ActiveXObject("MSXML2.XMLHttp.3.0");
xmlhttp2.open("POST","http://server/testpost.asp",true);
xmlhttp1.send(dataToSend1.XMLDocument);
xmlhttp2.send(dataToSend2.XMLDocument);
With this sample code:
- For both POSTs, a new HTTP connection is opened and an anonymous POST is sent.
- The server replies with 401.2 for both POSTs (the server is configured with basic authentication).
- The credentials dialog box opens (only once for both POSTs).
- The first POST request is sent with the supplied credential and correct data.
- The second POST request is sent with the supplied credentials, but data is missing.
RESOLUTIONTo resolve this problem, obtain the latest service pack for Internet Explorer 6. For additional information, click the following article number to view the article in the
Microsoft Knowledge Base:
328548 How to Obtain the Latest Internet Explorer 6 Service Pack
The English version of this fix should have the following file attributes or later:
Date Time Version Size File name
----------------------------------------------------------
11-Dec-2001 11:14 6.0.2711.1200 479,232 Urlmon.dll
WORKAROUND
To work around this problem, you can first connect by using a synchronous connection before the two asynchronous connections. This causes authentication to be carried out properly before the data is posted.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Internet Explorer 6 Service Pack 1.
Modification Type: | Minor | Last Reviewed: | 4/4/2005 |
---|
Keywords: | kbbug kbfix kbIE600preSP1fix kbIE600sp1fix KB311730 |
---|
|