我在一个解决方案中创建了两个项目。 我必须在注销后从MVC4中的第一个项目重定向到第二个项目的登录页面。
我该怎么做?
答案 0 :(得分:0)
它仍然是一个不同的项目,因此它将在不同的URL和/或端口上运行。 因此,我认为最简单的方法是从Logout方法重定向到该URL。
public ActionResult Logout()
{
return Redirect("http://URL:PORT/Account/");
}
如果您有任何网址参数
public ActionResult Logout()
{
var someVars = "?Hello=hello";
return Redirect("http://URL:PORT/Account/" + someVars);
}