Asp .NET MVC 5

时间:2019-04-11 16:01:42

标签: c# xml asp.net-mvc-5

这是我的表格

 @using (Html.BeginForm("Login", "Account", new { ReturnUrl = Request.QueryString["ReturnUrl"] }, FormMethod.Post, new { id = "frmInput" }))

和表单身份验证

<authentication mode="Forms">
  <forms  loginUrl="~/Account/" defaultUrl="~/Home/Index" slidingExpiration="true"></forms>
</authentication>

但是,当由于表单身份验证而从Home / Index重定向到Login时,QueryString只是

  

?ReturnUrl =%2f

,并在重定向到此时在控制器上给出异常...我如何从中获取实际路径?

0 个答案:

没有答案