Wednesday 29 April 2009

HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.

Are you getting this message when you are trying to access to anothers class from your webservice?:

HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials

First thing to do:

1-Start a command prompt.

2-Locate and then change to the directory that contains the Adsutil.vbs file. By default, this directory is C:\Inetpub\Adminscripts.

3-Type the following command, and then press ENTER:

cscript adsutil.vbs set w3svc/NTAuthenticationProviders "NTLM"

4-To verify that the NtAuthenticationProviders metabase property is set to NTLM, type the following command, and then press ENTER:

cscript adsutil.vbs get w3svc/NTAuthenticationProviders

5-The following text should be returned:NTAuthenticationProviders : (STRING) "NTLM"

The second thing to do:

1-To solve this problem the best way is go to IIS->default site->your webservice virtual folder
2-Right click->properties-.directory security->edit
3-Be sure that everything is like this:




If you still having problems, just fllow this KB from Microsoft (Good luck)
http://support.microsoft.com/kb/871179

No comments: