I have seen such as
<location path="~/SomeController">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
I placed this section after the section where it has the with authentication. This doesn’t seem to work. It still asks for log in.
Am I missing something? I’m really new to this so I apologize if this is very rudimentary stuff.
You really shouldn’t be using the web.config to control the authentication of your application.
Use the
Authorizeattribute on the controllers you want to secure, and leave it off the ones you don’t.See this blog post for more details.