While working in IIS 7, I have faced a very popular error as:
Unknown Error (0x8000500c) COMException in DirectoryService
You might get lots of solutions to fix it. But in my case, I couldn’t fix it with different ways. I have published an Application on IIS 7 and I have enabled Windows Authentication on IIS. However, the page is still giving the error:
HTTP Error 401.1 – Unauthorized
You do not have permission to view this directory or page using the credentials that you supplied.
It is very simple to fix this issue. Kindly follow the following instruction to fix it:
- Go To IIS, click on the Sites ->Your application, then click on Features View on the bottom of IIS, open the Authentication feature
- Click on Windows Authentication –> Click On Providers on the Right Hand of the screen. Take a reference of my screenshot. And move the NTLM Up to be the top most Provider.
And then, kindly reset the IIS from the command prompt (open it in admin mode)
After it, try to run your application. It will work like a charm.