I'm attempting to upgrade an MVC project to Beta using Razor (from the Preview release) and am now experiencing strangeness with Razor not going to my login view that it use to go to (when someone asks for an action that required authorization).
My web config has
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
But whenever an action with the Authorize attribute is hit, the browser redirects to "Account/Login" - notice Log*in* NOT Log*On*. Anyone know how to fix this in MVC 3 Beta?
It is a known bug in Beta: Release Notes: Chapter Known Issues
There’s a known issue that causes Forms Authentication to always redirect unauthenticated users to /Account/Login, ignoring the forms authentication setting used in Web.config. The workaround is to add the following app setting.
<add key="autoFormsAuthentication" value="false" />
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