IIS 7 & IIS 8
Anonymous Authentication - 401.2.: Unauthorized: Logon failed due to ...
Last post Dec 07, 2012 04:40 AM by Lloyd Zhang
Dec 03, 2012 12:04 AM|LINK
I've searched many forums without success on an answer. I have the following URLs on a single IIS install:
Both app1 and app2 are seperate applications. They have their own content. Both healthcheck instances are seperate copies of the same healthcheck application. So in short there's one site with two 'parent' applications and within each of them, they each
have one copy of the 'child' application, healthcheck.
The first one works fine however when accessing the second healthcheck application I get the following error. The directory permissions all seem the same and correct.
An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the
Web server's administrator for additional assistance.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
For the sake of testing, I update the path of app1's healthcheck to point to the app2 healthcheck directory and http://myserver/app1/healthcheck works fine. By contrast if I update app2's healthcheck to point to the app1 healthcheck directory and then access
http://myserver/app2/healthcheck I get the above error.
In Authentication both are set to Anonymous using the Application pool identity for the credentials. For the sake of testing I updated app2's anonymous credentials to be an account that's a local administrator, but the same thing happened. If I updated app2's
Authentication to be Windows Authentication the healthcheck app works.
Dec 03, 2012 09:04 PM|LINK
What are the NTFS permissions on disk for app2? Are they different than app1? Also, try running procmon to see which user is accessing the content on disk.
Dec 04, 2012 02:02 AM|LINK
What are the NTFS permissions on disk for app2? Are they different than app1?
No they are identical. I had a colleague double verify and we agreed the NTFS permissions are identical (they're actually inherited from a common parent).
Also, try running procmon to see which user is accessing the content on disk.
I'll give it a go, though if you have any thoughts I'd be keen to hear them.
Dec 07, 2012 04:40 AM|LINK
As I know, generally, if NTFS permission is the issue, it will be more likely to be a 401.3. I agree that procmon could show some clues on this issue. And I suggest you review the authentication and authorization settings for both application to see if they
are exactly identical:
%windir%\system32\inetsrv\appcmd list config "SiteName/AppName" -section:system.webServer/security/authentication/windowsAuthentication
%windir%\system32\inetsrv\appcmd list config "SiteName/AppName" -section:system.webServer/security/authorization
Hope this helps, thanks.