No authenticationScheme was specified, and there was no DefaultChallengeScheme found Cookies Authentication

后端 未结 3 1936
小蘑菇
小蘑菇 2021-01-03 18:26

I am using the below code for authentication in ASP.NET Core 2.0 using cookies

services
    .AddAuthentication(CookieAuthenticationDefaults.AuthenticationSch         


        
3条回答
  •  离开以前
    2021-01-03 19:04

    HttpContext.Authentication is obsolete in ASP.net core 2.0, so instead HttpContext.Authentication.SignInAsync use HttpContext.SignInAsync

提交回复
热议问题