Here I am going to explain How to fix the error 401 – Unauthorized: Access is denied due to invalid credentials. I was suffered a lot to resolve this error, finally I got 2 solution to resolve this error. You can also try this solutions I hope this will help many of the developers to come out from this error.
1. Open iis(RUN -> inetmgr) and select the website that is causing the 401
2. Open the “Authentication” property under the “IIS” header
3. Click the “Windows Authentication” item and click “Providers”
4. Move NTLM at top .
5. Reset IIS
look into the below given image.
If still your issue persists okay, let us go to the next option.
1. Uninstall and reinstall IIS.
2. Opened IIS and do Edit Permissions on the site, ensuring that IIS_IURS has Read, Read & Execute and List Folder Contents
You need another account “IUSR” added and has permissions for execute,read,list.
3. Restart the server.
Hope this will help !!!.