This is my settings at web.config:
<authentication mode="Forms">
<forms loginUrl="~/Login/Login" timeout="2880" />
</authentication>
On my controller I have few actions, on every action I added [AllowAnonymous] decoration, but I'm getting redirection from every action to the Login action.
I even tried to add [AllowAnonymous] decoration to the controller, but it doesn't help.
Thanks
I had a similar issue and resolved it by adding the following to my web.config
<location path="Login">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
I also had to add similar location statements to get my stylesheets, scripts, and images available prior to authentication.
Edit 1
I realized that I actually ran into this issue while running my MVC app as an application in a virtual directory, instead of being the base site. YMMV.
I recently encountered this problem. Some of our team members had to switch Specific user
to Application pool identity
in IIS Authentication settings.
Anonymous Authentication enabled
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With