【发布时间】:2021-02-11 01:10:08
【问题描述】:
我无法在我的本地复制此问题,它只发生在我们的登台服务器中。下面是 Account 控制器中 Login 函数的代码:
public ActionResult Login(string returnUrl)
{
if (Request.IsAuthenticated)
{
if (User.IsInRole(Role.Customer))
{
return RedirectToAction("Catalog", "Inventory");
}
else if (User.IsInRole(Role.Admin))
{
return RedirectToAction("Dashboard", "Admin");
}
else
{
return RedirectToAction("Index", "Dashboard");
}
}
else
{
ViewBag.ReturnUrl = returnUrl;
return View();
}
}
这仅在打开 Dashboard\Index 时发生,并且打开其他页面没有问题。发生这种情况时,我将附上网络的屏幕截图。它正在访问同一页面。
是否有可能是因为我在本地将其设置为 https,但在暂存时却是 http?
【问题讨论】:
标签: c# asp.net-mvc iis