In an asp.net mvc3 website, I imported the microsoft.web.helpers, webmatrix.data, and webmatrix.webdata. After that, I have found that when I use the [Authorize] attribute on some ActionResults in Controllers, my redirect points to account\login and not account\logon which is what it had done before and is the default.
I'm not using WebMatrix but would like to use the microsoft.web.helpers functionality. I've searched in code for any reference to account\login but there isn't any I could find. My web config for authentication is shown below:
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
To override use:
<configuration>
<appSettings>
<add key="loginUrl" value="~/Account/Logon" />
</appSettings>
</configuration>
From http://www.redmountainsw.com/wordpress/archives/webmatrix-redirects-unauthorized-pages-to-accountlogin
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