Methode nicht gefunden: „Boolean Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider.get_AllowsCachingPoliciC#

Ein Treffpunkt für C#-Programmierer
Guest
 Methode nicht gefunden: „Boolean Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider.get_AllowsCachingPolici

Post by Guest »

Ich habe ein ASP.NET Core 8-Web-API-Projekt erstellt.
Aber wenn ich das Projekt ausführe, erhalte ich diese Fehlermeldung:
System.MissingMethodException : 'Methode nicht gefunden: 'Boolean Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider.get_AllowsCachingPolicies()'.'

Der Fehler tritt bei app.Run();
aufvar builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllers();

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();

app.Run();

Ich verstehe es nicht. Ich habe das Paket Microsoft.AspNetCore.Authorization installiert, aber ich habe immer noch das gleiche Problem.
Weiß jemand, was das Problem ist?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post