Microsoft KB Archive/290893

= FIX: XMLHTTP.Open Method Fails When the Password Contains a Number Sign (#) =

Article ID: 290893

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft XML Parser 2.6
 * Microsoft XML Core Services 4.0
 * Microsoft XML Parser 3.0 Service Pack 1

-



This article was previously published under Q290893



SYMPTOMS
When you try to open a connection by using a XMLHTTP object with a username and password, and the password contains a number sign (#), a run-time error occurs on the Send method and you receive the following error message:

Error number:800401e4

Error Description: Invalid Syntax

NOTE: This does not occur with MSXML versions 1.0, 2.0, or 2.5.



CAUSE
The XML processes (instead of escapes) the number sign (#).



RESOLUTION
To work around this problem, use earlier versions of the XMLHTTP object to make the requests.



STATUS
This problem was corrected in MSXML 4.0.



Steps to Reproduce Behavior
 Make sure that you have a user account with a password set up on a computer that is running Microsoft Windows NT or Microsoft Windows 2000.  Paste the following code into Notepad and save it as Clienthttp.asp. 



  In the above code, change TestUser and Test#User to reflect your user account's user name and password, respectively.  Paste the following code into Notepad and save it as Receiver.asp. <%@language=vbscript%> <%   Response.ContentType = &quot;text/xml&quot; response.write &quot;<ReturnValue>1</ReturnValue>&quot; %> </li> In the Internet Information Services Manager, right-click Receiver.asp and click Properties. Click File Security and edit the anonymous user authenication so that only Basic Authentication is selected. Click OK to save the changes.</li> Make sure that the page is set for Basic authentication and that the user account that you have chosen can browse to Receiver.asp.</li> Run Clienthttp.asp.</li> Click the button that you created.</li></ol>

<div class="references_section">