79576323

Date: 2025-04-16 03:05:56
Score: 1.5
Natty:
Report link

The issue is likely caused by incorrect middleware order in Startup.cs. Try the following modification:

app.UseHttpsRedirection();
app.UseRouting();
app.UseCors("AllowAll");
app.UseAuthentication();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
    endpoints.MapControllers();
});

You can also refer to this document:

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-3.1#middleware-order-2

Reasons:
  • Blacklisted phrase (1): this document
  • Whitelisted phrase (-1): Try the following
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ballway