Many APIs fail mysteriously with:
“Unexpected end of request content.”
Because the request body timeout is too low.
✔ Fix
builder.WebHost.ConfigureKestrel(o =>
{
o.Limits.RequestBodyTimeout = TimeSpan.FromMinutes(5);
});
💡 Life-Saver For:
-
file uploads
-
slower mobile clients
-
integrations with old systems
