Aspnetcore: Uploading a Large File And Timeouts

Created on 11 Jul 2019  路  5Comments  路  Source: dotnet/aspnetcore

How do we set the request timeout in a self-hosted ASP.NET Core app?

When a client tries to upload a large file, the request inevitably times-outs. I've found no-way of being able to set this reliably outside of all of the samples that rely on IIS.

I'm using ASP.NET Core 2.2.

(Ref: https://github.com/aspnet/AspNetCore.Docs/issues/13243)

area-servers question

All 5 comments

Side note that we have _many_ updates to the current topic on https://github.com/aspnet/AspNetCore.Docs/pull/12344 that cover our (my) best understanding of managing limits at this time. Engineering will :eyes: and assist on review with those updates later (no ETA at this time due to 3.0 work).

ASP.NET Core itself doesn't have a "Request Timeout" concept. IIS does but Kestrel does not. Are you using IIS (since your comment indicates you aren't)?

What does exist when using Kestrel is a "minimum data rate" that requires that the client provide data at a minimum rate, and if it gets too slow terminates the connection (this is a security protection). What errors or logs are you seeing on the server when the errors are being reported? You may need to increase the log level for Microsoft to Debug in your appsettings.json to see it. If that's what you're hitting, it is possible to change the minimum data rate requirement (or remove it entirely).

@anurse I'm due to pick this issue up again this week, so I'll certainly try the minimum data rate trick - seeing if I can remove it. Thanks! I'm not using IIS. I'll post back when I know more.

I added a cross-link to the File Uploads PR to surface the data rates ...

https://github.com/aspnet/AspNetCore.Docs/pull/12344/commits/503bf140b45abaf77dae643242695ec5a8d5db40

Thank you for contacting us. Due to no activity on this issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mkArtakMSFT picture mkArtakMSFT  路  89Comments

zorthgo picture zorthgo  路  136Comments

moodya picture moodya  路  153Comments

pekkah picture pekkah  路  200Comments

Rast1234 picture Rast1234  路  104Comments