işlemek için yapılandırılmış ve ben edilir: Giriş yaptığımda Bu iyi çalışırKimlik doğrulama işleyicisi ben ASP.NET çekirdekli ASP.NET Kimlik kullanıyorum düzeni Microsoft.AspNet.Identity.Application
services.AddIdentity<User, Role>();
. Ben AuthenticationScheme = "cookies"
, AutomaticAuthenticate = true
ve AutomaticChallenge = true
sahip
No authentication handler is configured to handle the scheme:
Microsoft.AspNet.Identity.Application
Not: aşağıdaki hatayı alıyorum Bununla
services
.AddIdentity<User, Role>(x => {
x.Cookies = new IdentityCookieOptions {
ApplicationCookie = new CookieAuthenticationOptions {
AccessDeniedPath = new PathString("/signin"),
AuthenticationScheme = "cookies",
AutomaticAuthenticate = true,
AutomaticChallenge = true,
CookieName = "_ath",
LoginPath = new PathString("/signin"),
LogoutPath = new PathString("/signout")
}
};
})
.AddEntityFrameworkStores<Context, Int32>()
.AddDefaultTokenProviders();
: Ama sonra bu kurulumu çalıştı.
Ben de var şu Starttup/Yapılandırma yönteminde: ...
applicationBuilder
.UseIdentity()
.UseMvc(routes => { routes.MapRoute(name: "default", template: "{controller=Home}/{action=Index}/{id?}"); })
Ben de varsayılan düzeni kullanıyorum varsayalım
kimse ben eksik biliyor mu?
Maalesef bu bana yardım etmiyor çünkü bende zaten var. Sorumu yansıtacak kodu güncelledim ... –