Microsoft KB Archive/942228

= FIX: An authentication failure occurs when a .NET Framework 1.1 client application tries to access some resources from IIS 7.0 on a Windows Vista-based computer =

Article ID: 942228

Article Last Modified on 11/9/2007

-

APPLIES TO


 * Microsoft .NET Framework 1.1

-



SYMPTOMS
When a Microsoft .NET Framework 1.1 client application tries to access some resources from Internet Information Services (IIS) 7.0 on a Windows Vista-based computer, an authentication failure occurs. This problem occurs if one of the following conditions is true:
 * IIS is configured to have more than one authentication scheme for the client-requested resources. And, one of the authentication schemes is Integrated Windows authentication.
 * IIS is configured for Integrated Windows authentication only. However, the value of the NTAuthenticationProviders metabase property for the client-requested resources is set to Negotiate,NTLM.

When the authentication failure occurs, you may receive an exception that resembles the following:

The remote server returned an error: (401) Unauthorized.

at System.Net.HttpWebRequest.CheckFinalStatus

at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)

at System.Net.HttpWebRequest.GetResponse at simpleclient.Form1.Button2_Click(Object sender, EventArgs e) in E:\Attempts\simpleclient\Form1.vb:line 123

Note This problem does not occur if the .NET Framework 1.1 client application tries to access some resources from IIS on a Windows Server 2008-based computer.



CAUSE
This problem occurs because of a problem in the .NET Framework. When a client application tries to access some resources from IIS, IIS sends back &quot;WWW-Authenticate&quot; headers to the client application. The headers indicate what authentication schemes are configured for the client-requested resources. When the client application selects Integrated Windows authentication as the authentication scheme, the application sends back a token. Then, IIS sends back a challenge to the token. If other authentication schemes are also defined for the client-requested resources, IIS may send other &quot;WWW-Authenticate&quot; headers together with the challenge in the response. In this case, the .NET Framework client application incorrectly parses the challenge, and the authentication failure occurs.

Note Earlier versions of IIS do not send back other possible authentication schemes for the client application. Therefore, this problem does not occur.



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

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

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 usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites
You must have the .NET Framework 1.1 Service Pack 1 installed to apply this hotfix.

Restart requirement
You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) 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 item in Control Panel.



WORKAROUND
To work around this problem, use one of the following methods:  Do not use the Integrated Windows authentication scheme on IIS. If the Integrated Windows authentication scheme is used, set the NTAuthenticationProviders metabase property to one of the following values:  Negotiate NTLM

Notes  If you set the value of the NTAuthenticationProviders metabase property to Negotiate, the client application can select either NTLM authentication or Kerberos authentication. For more information about how to configure IIS to support both the Kerberos protocol and the NTLM protocol for network authentication, click the following article number to view the article in the Microsoft Knowledge Base:

215383 How to configure IIS to support both the Kerberos protocol and the NTLM protocol for network authentication

</li> Even though you have made this change, if any additional authentication scheme is set for the client-requested resources, an authentication failure will occur.</li></ul> </li> If the client application selects Integrated Windows authentication as the authentication scheme, suppress other &quot;WWW-Authenticate&quot; headers. To do this, create a server side plug-in, such as a native module or an ISAPI filter.</li></ul>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Additional query words: .Net 1.1 Framework HttpWebRequest Vista Unauthorized IIS7 NTLM authentication

Keywords: kbfix kbpubtypekc kbqfe kbhotfixserver kbexpertiseadvanced KB942228

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.