services.AddAuthentication("Auth").AddCookie("Anth",cfg=> {
cfg.LoginPath = "Account/Login";
cfg.LogoutPath = "Account/Logout";
cfg.ReturnUrlParameter = "backUrl";
cfg.ExpireTimeSpan = TimeSpan.FromMinutes(20);
cfg.AccessDeniedPath = "Account/Forbid";
});
我已经配置了“ ReturnUrlParameter”。但是,当我启动Web浏览器时,页面重定向到登录页面时,ReturnUrl的ParameterName不是"backUrl"
。
它仍然是:“ ReturnUrl”
https://localhost:5001/Account/Login?ReturnUrl=%2FUserManage%2FUsers
您会看到:它仍然是"ReturnUrl"
。我在哪里弄错了?
aspnetCore 2.2 mvc