Ich verwende 1.0.1
Version von asp.net core
und ich verwende Authentifizierung in meinem Formular.Kann Lambda-Ausdruck nicht in Typ "CookieAuthenticationOptions" konvertieren, da es kein Delegattyp ist
Ich benutze UseCookieAuthentication
und seine gibt einen Fehler
Kann nicht Lambda-Ausdruck konvertieren ‚CookieAuthenticationOptions‘ zu geben, weil es kein Typ Delegierter ist
Im Startup.cs
konfigurieren Methode.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
app.UseApplicationInsightsRequestTelemetry();
app.UseExceptionHandler("/Home/Error");
app.UseApplicationInsightsExceptionTelemetry();
app.UseStaticFiles();
app.UseSession();
app.UseCookieAuthentication(options =>
{
options.AutomaticAuthenticate = true;
options.AutomaticChallenge = true;
options.LoginPath = "/Home/Login";
});
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=About}/{id?}"
);
});
}
Bitte erläutern Sie, was Sie tun wollen und was das Problem genauer ist –