Help and Support

ServerXMLHTTP Object Fails When URL Contains More Than Two Spaces

Article ID:312989
Last Review:November 15, 2007
Revision:1.4
This article was previously published under Q312989
On This Page

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

Back to the top

RESOLUTION

A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:
http://go.microsoft.com/?linkid=6294451 (http://go.microsoft.com/?linkid=6294451)
Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
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
				

Back to the top

WORKAROUND

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

Back to the top

STATUS

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

Back to the top

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.

Back to the top


APPLIES TO
Microsoft XML Parser 3.0 Service Pack 2

Back to the top

Keywords: 
kbhotfixserver kbqfe kbbug kbfix kbqfe KB312989

Back to the top

Article Translations

 

Related Support Centers

Other Support Options

  • Contact Microsoft
    Phone Numbers, Support Options and Pricing, Online Help, and more.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.