猿问

.net core cookie的问题

[Authorize(AuthenticationSchemes = CookieAuthenticationDefaults.AuthenticationScheme)]

想请教一下如何在不加过滤器的情况下取cookie


慕容708150
浏览 636回答 1
1回答

烙印99

Startup.cs 中添加以下代码了吗?services.AddAuthentication(options => {     options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;     options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme; }) .AddCookie();
随时随地看视频慕课网APP
我要回答