Authentication of MVC 4 form - cannot access any other action next to the declaration specified in web.config

These are my settings in web.config:

  <authentication mode="Forms">
      <forms loginUrl="~/Login/Login" timeout="2880" />
  </authentication>

I have few actions on my controller, with each action I added a [AllowAnonymous] decoration, but I get a redirect from each action to the Login action.

I even tried adding the [AllowAnonymous] decoration to the controller, but that does not help.

thank

+5
source share
3 answers

Here is a question with a better description and answer:

Forms Authentication and Authorization MVC 4

0
source

I had a similar problem and resolved it by adding the following to my web.config

<location path="Login">
    <system.web>
        <authorization>
            <allow users="?" />
        </authorization>
    </system.web>
</location>

, , , .

1

, MVC , . YMMV.

+2

I recently ran into this problem. Some members of our team had to switch Specific userto Application pool identityIIS authentication settings.

Anonymous Authentication Enabled

IIS Anonymous Authentication

0
source

All Articles