草庐IT

AccessDeniedPath

全部标签

关于 c#:Authorize 属性重定向到 LoginPath 而不是 AccessDeniedPath

AuthorizeattributeredirectstoLoginPathinsteadofAccessDeniedPath我对应用程序cookie有以下配置:123456services.ConfigureApplicationCookie(options=>{  options.LoginPath=$"/Identity/LogIn";  options.LogoutPath=$"/Identity/LogOut";  options.AccessDeniedPath=$"";});还有以下授权策略:12345services.AddAuthorization(options=>{  o

关于 c#:Authorize 属性重定向到 LoginPath 而不是 AccessDeniedPath

AuthorizeattributeredirectstoLoginPathinsteadofAccessDeniedPath我对应用程序cookie有以下配置:123456services.ConfigureApplicationCookie(options=>{  options.LoginPath=$"/Identity/LogIn";  options.LogoutPath=$"/Identity/LogOut";  options.AccessDeniedPath=$"";});还有以下授权策略:12345services.AddAuthorization(options=>{  o