Sitemde Çerez Kimlik Doğrulaması eklemek için here yönergelerini izlemeyi deniyorum.InvalidOperationException: Hiçbir IAuthenticationSignInHandler, şema için oturum açma işlemek üzere yapılandırıldı: MyCookieAuthenticationScheme
Şimdiye kadar aşağıdaki eklemiş:
Invoke the UseAuthentication method in the Configure method of the Startup.cs file:
app.UseAuthentication();
Invoke the AddAuthentication and AddCookie methods in the ConfigureServices method of the Startup.cs file:
services.AddAuthentication("MyCookieAuthenticationScheme")
.AddCookie(options => {
options.AccessDeniedPath = "/Account/Forbidden/";
options.LoginPath = "/Account/Unauthorized/";
});
benim giriş kodu Sonra
await HttpContext.SignInAsync("MyCookieAuthenticationScheme", principal);
principle
bir ClaimsPrincipal
olduğunu var.
siteme giriş ve ben hata alıyorum yukarıdaki hattını arayın: kaçırdığım ne
InvalidOperationException: No IAuthenticationSignInHandler is configured to handle sign in for the scheme: MyCookieAuthenticationScheme
?
Teşekkür ederiz! Günün çoğunu anlamaya çalışıyorum. Orada çok sayıda örnek var ama kimlik doğrulama işleyicisini kaçırıyorlar. – Tom