asp.net-mvc – MVC表单LoginUrl不正确
发布时间:2020-12-15 18:53:11 所属栏目:asp.Net 来源:网络整理
导读:我有一个ASP.NET MVC 3应用程序与表单认证。由于某些原因,我看不到,登录重定向URL是/ Account / Login?ReturnUrl = / Secure / Action而不是/ Account / LogOn?ReturnUrl = / Secure / Action。区别是微妙的,它使用/ Account / Login而不是/ Account /
我有一个ASP.NET MVC 3应用程序与表单认证。由于某些原因,我看不到,登录重定向URL是/ Account / Login?ReturnUrl = / Secure / Action而不是/ Account / LogOn?ReturnUrl = / Secure / Action。区别是微妙的,它使用/ Account / Login而不是/ Account / LogOn。
我的web.config表单部分是正确的。否则可能会影响登录url? <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="720" /> </authentication> 解决方法
这是一个已知的问题。我有我的自定义authorizationize属性相同的问题。我发现解决方案在网上的某个地方,不记得在哪里。只需将它添加到web.config中的appSettings
<add key="loginUrl" value="~/Account/LogOn" /> 注意:这与MVC 3,我没有尝试它与以前的版本。 编辑: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 分层ASP.NET MVC应用程序
- asp.net-mvc-3 – 如何在mvc3视图中的mvcgrid中多次添加同一
- IIS 7应用程序池标识权限
- asp.net-mvc – Url.Action映射Route属性的错误链接
- asp.net-mvc – MVC 4 SimpleMembership – 登录后为什么We
- 使用ASP.NET将HTML表导出到Excel
- asp.net-mvc – 为MVC3 DateTime设置DataFormatString
- asp.net – 为什么在Visual Studio 2010中禁用“使用自定义
- asp.net-mvc – warns – html.helpers在项目更新后无法识别
- asp.net – 解析服务器端标记时出错
推荐文章
站长推荐
- asp.net-mvc – .net Razor替代PHP echo
- asp.net – this.Page和(页面)HttpContext.Curre
- asp.net – 可以在.NET Framework和.NET Core之间
- asp.net-web-api – 在WebAPI中的TaskScheduler.
- asp.net – GridView AutoGenerateColumns和排序
- 如何保护我的ASP.NET AJAX应用程序?
- asp.net – 返回新的RedirectResult()vs返回Redi
- asp.net-mvc – 使用Checkboxes绑定到具有强类型
- asp.net-mvc – ASP.NET MVC 4 Web API无法映射包
- asp.net-mvc – 我可以从HttpContext获取控制器吗
热点阅读