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