<appSettings>
...
<add key="loginUrl" value="~/Account/LogOn" />
</appSettings>
---
I discovered the root of this problem: I had added 'deployable dependency' on 'ASP.NET Web Pages with Razor Syntax'. This adds a reference to: WebMatrix.Data.dll This assembly has a class with a static constructor that does the following: static FormsAuthenticationSettings(){ FormsAuthenticationSettings.LoginUrlKey = "loginUrl"; FormsAuthenticationSettings.DefaultLoginUrl = "~/Account/Login";} That explains!
---
Kaynaklar:
http://nickstips.wordpress.com/2011/07/27/asp-net-mvc-unauthenticated-user-always-redirected-to-accountlogon-despite-custom-sign-in-url/
http://stackoverflow.com/questions/7238369/being-redirected-to-wrong-loginurl-account-login-instead-of-account-logon
http://forums.asp.net/t/1678471.aspx/1
Hiç yorum yok:
Yorum Gönder