繁体   English   中英

UseCookieAuthentication不会重定向到登录页面asp.net核心

[英]UseCookieAuthentication doesnt redirect to login page asp.net core

我在dotnetcore Web应用程序的启动类中具有以下内容:

app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationScheme = "Cookies",
                AutomaticAuthenticate = true,
                AutomaticChallenge = true,
                LoginPath = "/account/login"
            })

我收到未经授权的401,但没有重定向到我的/ account / login页面-有什么想法吗?

如果您的Cookie中间件版本高于1.0.0,请检查

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM