ServerXMLHTTP Validation Failures When You Use Extended Characters in User Names (316594)



The information in this article applies to:

  • Microsoft XML 3.0 SP2

This article was previously published under Q316594

SYMPTOMS

Authentication fails when you use the MSXML2.ServerXMLHTTP class to open a URL with a user name that contains an extended character such as the following:
Läder
Similar code that uses the Microsoft.XMLHTTP class with the same user name works correctly.

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 MSXML3 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 should have the following file attributes or later:
 Date        Version       Size     File name     Platform
 -----------------------------------------------------------
 01/18/2002  8.20.9318.0    1,105,920 msxml3.dll       x86
 01/18/2002  8.20.9318.0       24,576 msxml3a.dll      x86
 01/18/2002  8.20.9318.0       44,032 msxml3r.dll      x86
 01/18/2002  6.00.2462.0       28,672 xmlinst.exe      x86
				

WORKAROUND

Use the Microsoft.XMLHTTP class, or apply this hotfix.

STATUS

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

Steps to Reproduce the Behavior

  1. On your IIS Web server computer, create a folder that is named TestAccess.
  2. Right-click the folder, and then click Properties. On the Directory Security tab, edit the Authentication and Access Control section, and make sure that only Integrated Windows Security is selected.
  3. On your Web server computer, create a local NT user name that is named as follows:
    Läder
  4. Grant the correct NT permissions for the local NT user that is named:
    Läder
    to read a file from the folder on the Web server.
  5. Copy a test XML file that is named test.xml to the TestAccess folder.
  6. Create a Visual Basic 6.0 standard form based project, and then add the following code to the project:
    Private Sub Command1_Click()
    Dim objXMLHTTP As Object
    Dim strURL As String
    Dim strUser As String
    Dim strPwd As String
    Dim strWebServer As String
    
      ' Replace MyWebServer below with the name of your Web server.
      strWebServer = "MyWebServer"
      strURL = "http://" & strWebServer & "/testaccess/test.xml"
      strUser = strWebServer & "\L" & Chr(228) & "der"
      strPwd = "Password1" ' Adjust password here as needed.
      
      fUseWorkAround = False
      if (fUseWorkAround) Then
        Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP")
      Else
        Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
      End If
    
      Debug.Print "strURL  = " & strURL
      Debug.Print "strUser = " & strUser
      Debug.Print "strPwd  = " & strPwd
    
      objXMLHTTP.open "GET", strURL, False, strUser, strPwd
    
      ' Set request headers.
      objXMLHTTP.setRequestHeader "Content-Type", "text/xml"
    
      ' Send query.
      objXMLHTTP.send
    
      'Display the results.
      If (objXMLHTTP.Status >= 200 And objXMLHTTP.Status < 300) Then
        Debug.Print "Success!"
        Debug.Print "Status       = " & objXMLHTTP.Status
        Debug.Print "StatusText   = " & objXMLHTTP.statusText
      Else
        Debug.Print "Failure!"
        Debug.Print "Status       = " & objXMLHTTP.Status
        Debug.Print "StatusText   = " & objXMLHTTP.statusText
      End If
    
      Set objXMLHTTP = Nothing
    
    End Sub
    					
  7. Run the code. Without the hotfix applied, you see the following:
    Failure!
    Status = 401
    StatusText = Access Denied
  8. If you set fUseWorkAround as follows:
    fUseWorkAround = True
    in the code, you see the following:
    Success!
    Status = 200
    StatusText = OK

Modification Type:MajorLast Reviewed:4/7/2006
Keywords:kbQFE KBHotfixServer kbbug kbfix KB316594 kbAudDeveloper