Data Is Not Posted Correctly by Using XMLHTTP to Send Multiple Asynchronous POSTs

Article translations Article translations
Article ID: 311730 - View products that this article applies to.
This article was previously published under Q311730
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

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.

RESOLUTION

To 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.

STATUS

Microsoft 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.

Properties

Article ID: 311730 - Last Review: February 27, 2014 - Revision: 3.8
APPLIES TO
  • Microsoft Internet Explorer 6.0, when used with:
    • Microsoft Windows XP Home Edition
    • Microsoft Windows XP Professional
    • Microsoft Windows XP Media Center Edition
    • Microsoft Windows XP Tablet PC Edition
    • Microsoft Windows 2000 Advanced Server
    • Microsoft Windows 2000 Datacenter Server
    • Microsoft Windows 2000 Professional Edition
    • Microsoft Windows 2000 Server
    • Microsoft Windows NT Server 4.0 Standard Edition
    • Microsoft Windows NT Server 4.0, Terminal Server Edition
    • Microsoft Windows NT Workstation 4.0 Developer Edition
    • Microsoft Windows Millennium Edition
    • Microsoft Windows 98 Second Edition
    • Microsoft Windows 98 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix kbie600presp1fix kbie600sp1fix KB311730

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com