If you are experiencing the 401 error with Windows authentication on Windows 7, Windows Server 2008 R2 or Windows Vista, you have to set up your IIS the following way:
1. Go to Start -> Control Panel -> Administrative Tools and start the Internet Information Services (IIS) Manager.
2. Locate and select your site in IIS tree and click on the Authentication icon.
3. Enable Windows Authentication by clicking on the Enable link in the Actions menu.
Windows Authentication missing in the list
The default installation of Windows 7, Windows 2008 R8 and Windows Vista does not contain Windows Authentication by default. If it is missing in the list is step 3 above, you need to install it.
To do it, go to Control Panel -> Programs and Features -> Turn windows features on or off. Scroll down to IIS, expand all of the nodes to find the Security node and under it, check the Windows Authentication check-box. Click OK to save the settings.