【发布时间】:2019-07-26 17:54:33
【问题描述】:
当有人点击仅在登录后才能访问的此类页面时,我将使用查询字符串设置url。我将该控制器名称设置为查询字符串并重定向到登录页面。到这里为止一切正常。但是当我登录并使用Response.Redirect(returnUrl); 时,它会将我的会话转换为空。这里的 returnurl 是 /Control/Index。如果我只是重定向为返回RedirectToAction("Index", "Control");,那么它工作正常。
可能是什么问题。
Working Good Redirection - RedirectToAction("Index", "Control");
Not Working Redirection - Response.Redirect("/Control/Index");
【问题讨论】:
标签: asp.net-core asp.net-core-mvc asp.net-core-2.0 asp.net-core-2.1