在我工作时Asp.Net MVC mixed mode authentication,我需要redirect一个用户在从 NTLM windows auth 获得身份验证后WinLogin.aspx page。MVC route url
(我在同一个 Asp.Net MVC 项目应用程序中有 WinLogin.aspx 页面)
我只需要有关如何将用户从 .aspx 页面重定向到 MVC 路由 url 的帮助。(通过.aspx.cs后面的代码)
我尝试使用下面的代码,但没有任何效果。
代码 1:
Response.Redirect("/Home/Index"); // redirection NOT working, getting blank page with route url after redirection.
代码 2:
System.Web.Routing.RouteValueDictionary routeDict = new System.Web.Routing.RouteValueDictionary();
routeDict.Add("controller", "home");
routeDict.Add("action", "index");
Response.RedirectToRoute(routeDict); // redirection NOT working, , getting blank page with route url after redirection.
您能否就此向我提出您的建议?
提前致谢!