I'm just running the API as a console app. If I have
app.UseHsts();
app.UseHttpsRedirection();
in my code, when I try to authenticate using Postman I get no response. In Postman I don't have the SSL certificate verification turned on.
The Kestrel output:
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 POST http://localhost:5000/connect/token applica
tion/x-www-form-urlencoded 74
dbug: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[1]
Redirecting to 'https://localhost/connect/token'.
dbug: Microsoft.AspNetCore.Server.Kestrel[9]
Connection id "0HLJ4UL9EORCS" completed keep alive response.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 0.1439ms 307
dbug: Microsoft.AspNetCore.Server.Kestrel[25]
Connection id "0HLJ4UL9EORCS", Request id "0HLJ4UL9EORCS:00000001": starte
d reading request body.
dbug: Microsoft.AspNetCore.Server.Kestrel[26]
Connection id "0HLJ4UL9EORCS", Request id "0HLJ4UL9EORCS:00000001": done r
eading request body.
info: Microsoft.AspNetCore.Server.Kestrel[32]
Connection id "0HLJ4UL9EORCS", Request id "0HLJ4UL9EORCS:00000001": the ap
plication completed without reading the entire request body.
dbug: Microsoft.AspNetCore.Server.Kestrel[1]
Connection id "0HLJ4UL9EORCT" started.
dbug: Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets[6]
Connection id "0HLJ4UL9EORCT" received FIN.
dbug: Microsoft.AspNetCore.Server.Kestrel[10]
Connection id "0HLJ4UL9EORCT" disconnecting.
dbug: Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets[7]
Connection id "0HLJ4UL9EORCT" sending FIN.
dbug: Microsoft.AspNetCore.Server.Kestrel[2]
Connection id "0HLJ4UL9EORCT" stopped.
What does it mean that it doesn't read the entire request body?
If I run my app without HTTP redirection, it works fine. What is going on, how can I fix this?