Article ID: 871179 - View products that this article applies to.
When you try to access a Microsoft Internet Information Services (IIS) 6.0 Web site that is configured to use Integrated Windows authentication only, you are prompted for your user credentials. When you try to log on, you receive the logon prompt again. After you try to log on three times, you receive the following error message:
HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.
This behavior may occur if the following conditions are true:
If this behavior occurs when the application pool is running under a local account, follow the steps in the "Workaround" section.
To resolve this behavior when the application pool is running under a domain user account, set up an HTTP SPN with the NetBIOS name and the fully qualified domain name (FQDN) of the domain user account that the application pool is running under. To do this, follow these steps on a domain controller:
Important An SPN for a service can only be associated with one account. Therefore, if you use this suggested resolution, any other application pool that is running under a different domain user account cannot be used with Integrated Windows authentication only.
To work around this behavior if you have multiple application pools that run under different domain user accounts, you must force IIS to use NTLM as your authentication mechanism if you want to use Integrated Windows authentication only. To do this, follow these steps on the server that is running IIS:
If you set the SPN by using only the FQDN of the server that is running IIS, you will be prompted for your user credentials after 30 minutes. The 30-minute time-out occurs because of the way that Internet Explorer caches Domain Name System (DNS) information. After 30 minutes, Internet Explorer reverts to the NetBIOS name. Therefore, you must make sure that you also register the SPN by using the NetBIOS name of the server that is running IIS to avoid being prompted for your user credentials. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
263558To verify the registered SPNs for the user account that your application pool is running under, start a command prompt, type the following command from the directory where Setspn.exe is installed, and then press ENTER:
(https://support.microsoft.com/kb/263558/ )How Internet Explorer uses the cache for DNS host entries
setspn.exe -l UserNameA list of the registered SPNs for the user account is returned.
Internet Information Services (IIS) 7.0The topics discussed in this article can also apply to IIS 7.0 if one of the following conditions is true:
For additional information about using Integrated Windows authentication with IIS application pools, visit the following Microsoft Web site:
Integrated Windows Authentication (IIS 6.0)For additional information about authentication failures or access control failures in IIS, visit the following Microsoft Web site:
Authentication and Access Control Diagnostics Version 1.0 (IIS 6.0)Note The AuthDiag tool is designed to help you when you see either of the following error messages:
Article ID: 871179 - Last Review: August 9, 2012 - Revision: 7.0