3
我使用vNext,它运行良好本地主机,但在服务器重定向登录功能确实发送给我正确的网址(XXX /帐户/登录?ReturnUrl =%2FMonitoring),但我得到一条错误消息。vNext重定向登录返回404
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
的方法:
[HttpGet]
[AllowAnonymous]
public IActionResult Login(string returnUrl)
{
ViewBag.ReturnUrl = returnUrl;
return View();
}
Startup.cs
app.UseCookieAuthentication(options =>
{
options.AutomaticAuthenticate = true;
options.AutomaticChallenge = true;
options.AuthenticationScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.CookieName = "WnctAuthCookie";
if (!env.IsDevelopment())
options.CookieSecure = CookieSecureOption.Always;
options.ExpireTimeSpan = TimeSpan.FromMinutes(60);
options.SlidingExpiration = true;
options.LoginPath = new PathString("/Account/Login");
options.LogoutPath = new PathString("/Account/Logout");
});
我使用1.0.0-rc1-final
,我也使用IIS 7.5在Windows 7下,我有HTTPS启用。
我不确定天气这是由于IIS或其他设置的设置。有没有人有办法解决吗?
并直接导航到“/显示器”的工作? – Thorarins
@ Thorarins登录后,否则会重定向到登录并返回404 –
,因此它无法找到登录名? – Thorarins