Search code examples
iis-6windows-authenticationwindows-server-2008-r2

401 - Unauthorized: Access is denied due to invalid credentials. For windows authentication


I have a .Net web application that I deploy to a test webserver. The application uses Windows Authentication.

My boss likes to look at the version on the test server from time to time. Recently he found that he cannot access it. He is asked for his user credentials and then he gets a 401 error.

If he logs in with my credentials, no problem.

On my PC I do not have to login, it works as it should.

The configuration for the app is the same on live and test, but with different urls. My boss can open the live version with no problems.

So I am at a loss as to how to fix this.

I have looked at this link. https://support.microsoft.com/en-us/kb/871179

It looks like I do not have to download the Setspn.exe support tool as it is already on Windows Server 2008. However I do not know where to find it and I do not really understand what this reference is guiding me towards and whether this will fix my problem.

In IIS, the application pool used by the application uses the NetworkService identity.


Solution

  • I found that the error was caused by folder permissions not being set so that he can use them. So the solution was to right click on the folder, select security and add his security group to have the correct permissions.