Try to move app.UseCors(“CorsPolicy”) outside if (env.IsDevelopment());
and change your services.AddCors to anotner syntax:
services.AddCors(opt => opt.AddPolicy("CorsPolicy", c =>
{
c.AllowAnyOrigin()
.AllowAnyHeader()
.AllowCredentials()
.AllowAnyMethod();
}));
CLICK HERE to find out more related problems solutions.