Microsoft KB Archive/834396

= FIX: The XMLHTTP object handles uppercase server names incorrectly =

Article ID: 834396

Article Last Modified on 11/15/2007

-

APPLIES TO


 * Microsoft XML Parser 3.0 Service Pack 3
 * Microsoft XML Parser 3.0 Service Pack 2

-





SYMPTOMS
If you use an uppercase server name in the Open command of the msxml2.xmlhttp.3.0 object, you may receive the following error message:

HTTP Error 405 Method Not Allowed



CAUSE
You receive the 405 error message when you send an MKCOL method request, and the Open command of the XMLHTTP object contains an uppercase server name.

In whatever form the URL is received, the XMLHTTP object passes this URL to URLMON (URL Monitor). URLMON expects that the server name in the URL is canonicalized. However, the XMLHTTP object does not canonicalize the URL before it passes the URL to URLMON.

Note Canonicalization is the process that converts a URL that might contain unsafe characters, such as blank spaces and reserved characters, to an accepted format.



Service pack information
To resolve this problem, obtain the latest service pack for Microsoft XML 3.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

308480 INFO: How to Obtain the Latest Microsoft XML 3.0 Service Pack

Hotfix information
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

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

The English version of this hotfix 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         Time   Version            Size    File name --  05-Jan-2004  10:31  8.30.9927.0     1,123,840  Msxml3.dll



WORKAROUND
To work around this problem, use one of the following methods:
 * Convert the URL to lowercase, and then pass the URL to the XMLHTTP object.
 * Use the ServerXMLHTTP object instead of the XMLHTTP object.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section. This problem was first corrected in Microsoft XML 3.0 Service Pack 4.



MORE INFORMATION
When you send an uppercase server name, generally the request is submitted to the server two times. When you use the MKCOL method request with the Open command of the XMLHTTP object, the first request creates a new folder on the Web server. However, the second request fails with the 405 error because the folder already exists. The MKCOL method request succeeds. However, the client receives the error message that is mentioned in the &quot;Symptoms&quot; section because of the duplicate submission.

If you pass a URL that contains an uppercase server name (such as, http://MYSERVER/MYVIRDIR/somepage.asp) to the XMLHTTP object, XML does not canonicalize the URL and passes this URL to URLMON (URL Monitor). The XMLHTTP object uses the CoInternetParseURL method with the PARSE_CANONICALIZE parameter after the URL is passed to URLMON. When binding to the resource directly through the IInternetProtocol::Start pluggable protocol interface, URLMON expects the URL to be canonicalized. URLMON canonicalizes the URL automatically. However, because the XMLHTTP object goes through the IInternetProtocol::Start interface, this canonicalization does not occur.

The ServerXMLHTTP object does not pass the URL to URLMON. With the ServerXMLHTTP object, you can use the HTTP GET method and the HTTP POST method. You can also handle basic security logons with the ServerXMLHTTP object. Therefore, Microsoft recommends that you use the ServerXMLHTTP object instead of the XMLHTTP object.

