'How to effectively change authentication method in ASP. NET web.config?

I am trying to launch ASP.NET project on a local computer. IIS responds with 401.0 status code, stating that "authenticated user does not have access to a resource needed to process the request". Authentication mode is set to Windows in my web config, nonetheless logon method in Detailed Error Information is "Anonymous". Changing it to "None" brought no change. So how do I change authentication method that way so I log in via Windows Authentication?



Solution 1:[1]

I found out what happened and it’s hilarious. Turns out that Windows Auth was disabled in project properties, and anonymous auth was enabled instead. All the info I found before gave advice of opening project properties and switching auth method to Windows Auth. I tried to do this but somehow properties window didn't open, and they said that it was to open right on click on the project in solution explorer. And it actually did open, although my laptop's screen covered the area of monitor where it opened. So when I closed my laptop I immidiately saw needed properties panel, switched auth method, fired up IIS and everything got into order. So here's my wisdom: always make sure that you see the whole picture :)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 RobC