I recently had a support case where the user was not able to browse to his web site from the web server itself. He was getting prompted for credentials 3 times and after entering valid credentials each time he received a 401.1 Logon Failed Error. We checked the site and it was using Windows Integrated Authentication and we confirmed that we were able to log in successfully from a remote client machine. Any time you receive a 401.1 error from IIS, a good first step in troubleshooting this is by enabling logon failure audits in the local security policy. Turn on Failure auditing for "Audit account logon events" and "Audit Logon Events". Once this is enabled, all failures will show up in the computer's Security Event Log. Based on the fact that this worked from the remote client, I was fairly sure we were looking at a failure due to the loopback security check.
We checked the security event logs after turning on auditing and found the following:
You will however see entry similar to the one below Log Name: SecuritySource: Microsoft-Windows-Security-AuditingDate: 8/28/2008 10:06:27 AMEvent ID: 4625Task Category: LogonLevel: InformationKeywords: Audit FailureUser: N/AComputer: server1.somecustomer.comDescription:An account failed to log on.Subject:Security ID: NULL SIDAccount Name: -Account Domain: -Logon ID: 0x0Logon Type: 3Account For Which Logon Failed:Security ID: NULL SIDAccount Name: adminAccount Domain: bigcorpFailure Information:Failure Reason: An Error occured during Logon.Status: 0xc000006dSub Status: 0x0Process Information:Caller Process ID: 0x0Caller Process Name: -Network Information:Workstation Name: winvista1289Source Network Address: 10.10.3.20Source Port: 52105Detailed Authentication Information:Logon Process: Authentication Package: NTLMTransited Services: -Package Name (NTLM only): -Key Length: 0This event is generated when a logon request fails. It is generated on the computer where access was attempted.The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe. The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network). The Process Information fields indicate which account and process on the system requested the logon. The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases. The authentication information fields provide detailed information about this specific logon request. - Transited services indicate which intermediate services have participated in this logon request. - Package name indicates which sub-protocol was used among the NTLM protocols. - Key length indicates the length of he generated session key. This will be 0 if no session key was requested.
Based on the details it seemed likely that the loopback check was the issue. Unlike Windows Server 2003 and IIS6, the security event log does not show the normal strange characters identified in http://support.microsoft.com/kb/896861 but the workarounds that are listed still apply to IIS 7 on Windows Server 2008. Since indentifying this issue is slightly different on IIS 7, I felt it was worthwhile to let our customers know that the loopback security check feature is enabled on Windows Server 2008 IIS installations. As of this writing the KB 896861 does not indicate that the workarounds apply to IIS 7 but I have confirmed that they work.