ServerXMLHTTP Object Fails When URL Contains More Than Two Spaces (312989)



The information in this article applies to:

  • Microsoft XML 3.0 SP2

This article was previously published under Q312989

SYMPTOMS

If a URL contains more than two spaces, the ServerXMLHTTP object may fail with the following error message:
Run-time error '-2147012891 (80072ee5)' The URL is invalid

RESOLUTION

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Microsoft XML (MSXML) service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date        Version       Size       File Name     Platform
   -----------------------------------------------------------
   4-May-2002  8.20.9703.0   1,120,768  Msxml3.dll    x86
				

WORKAROUND

To work around this problem, replace each space in the URL with the standard URL escape character (%20).

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Paste the following code in a text file, and then save the file as C:\Inetpub\wwwroot\Test.asp:
    <%
    Response.write Request.Querystring("data")
    Response.end
    %>
    					
  2. In Microsoft Visual Basic 6.0, create a new Standard EXE project. By default, Form1 is added to the project.
  3. Paste the following code in the Load event of the form:
    Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
    
    ' Line 1
    xmlhttp.Open "GET", "http://localhost/test.asp?data=select * from customers", False
    
    ' Line 2
    'xmlhttp.Open "GET", "http://localhost/test.asp?data=select%20*%20from%20customers", False
    
    xmlhttp.setRequestHeader "Content-type", "text/xml" '"application/xml"
    xmlhttp.send
    MsgBox xmlhttp.responsetext
    Debug.Print xmlhttp.responsetext
    MsgBox "Completed HTTP GET using ServerXMLHTTP Object"
    					
  4. Run the project. Notice that you receive the error message that is listed in the "Symptoms" section of this article.
  5. Stop the project.
  6. Comment the line after Line 1, and then uncomment the line after Line 2.
  7. Run the project. Notice that a message box displays "Completed HTTP GET using ServerXMLHTTP Object." Notice that the URL uses the URL escape character (%20) instead of the spaces.

Modification Type:MinorLast Reviewed:10/7/2005
Keywords:kbHotfixServer kbQFE kbbug kbfix kbQFE KB312989