Kye*_*ica 17 asp.net-mvc forms-authentication asp.net-mvc-3
我在这里完全失败了.这工作得早.我有一个使用表单身份验证的MVC3应用程序.在web配置中,我有以下内容:
<authentication mode="Forms">
<forms loginUrl="~/Login/Index" timeout="2880"/>
</authentication>
Run Code Online (Sandbox Code Playgroud)
但是,出于某种原因,当重定向时,或者在检查FormsAuthentication.LoginUrl时,它仍然使用默认的/ Account/Login.哪个不存在.为什么web.config不会覆盖这个?
fre*_*nky 35
尝试将此添加到appSettings您的web.config:
<add key="loginUrl" value="~/Account/LogOn" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10947 次 |
| 最近记录: |