ASP.NET MVC登录RETURNURL始终是NULL? [英] ASP.NET MVC Login ReturnUrl always NULL?

查看:675
本文介绍了ASP.NET MVC登录RETURNURL始终是NULL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在ASP.NET MVC使用窗体身份验证尝试重新登录一个网站时,它把一个RETURNURL参数查询字符串。我的登录操作方法接受一个RETURNURL字符串。然而,似乎RETURNURL串总是空,即使当它显然是在查询字符串。为什么这可能是这样或可能的修复有什么想法?

Using Forms Authentication in ASP.NET MVC when trying to log back into a site, it puts a ReturnUrl parameter in the query string. My Logon action method accepts a "returnUrl" string. However it seems that returnUrl string is always null, even when it is clearly in the query string. Any thoughts on why this might be the case or a possible fix?

推荐答案

也许你不包括 RETURNURL 参数为你登录表单的action属性,从而张贴到URL没有这个参数?

Maybe you don't include the ReturnURL parameter into you login form's action attribute, thus posting to a URL without that parameter?

这篇关于ASP.NET MVC登录RETURNURL始终是NULL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆