arame3333
arame3333

Reputation: 10213

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.

Upvotes: 2

Views: 14392

Answers (3)

Jyoti Soni
Jyoti Soni

Reputation: 11

go to website properties in IIS Click on explore go to exact folder .Right click and check properties Inside properties there is security settings.Make sure the USer or particular user group are added to that folder. refresh the URL. for me it worked after so much of troubleshooting.

Upvotes: 0

arame3333
arame3333

Reputation: 10213

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.

Upvotes: 2

Henry
Henry

Reputation: 3013

I seen issues like this before, I'm not saying this is the answer to your problems, but it something you might want to try.

In IIS

  1. Open the "Authentication Feature"
  2. Click on "Windows Authentication"
  3. Click on Providers
  4. Change the order of the providers, there's only 2.

It's just odd that it will work for you and not your boss. Also check to make sure that's the only option enabled in the "Authentication Feature"

Upvotes: 1

Related Questions