I have a user who is trying to upload a 150 megabyte file using an ASP.NET site. They are getting an HttpException:
System.Web.HttpException: Maximum request length exceeded.
I believe I can solve this by increasing the executionTimeout to 300 seconds (5 minutes) and maxRequestLength to 204800 kilobytes (200 megabytes). But are there any potential negative effects or dangers from doing this?
I would recommend only setting those larger values for the page that needs them rather than the site as a whole; both can be set programmatically for the page. Otherwise, I don't see a problem with the increased timeout and file size. You should probably include a warning that the upload could take up to 5 minutes so users don't keep hitting buttons (ie: ajax progress bar).
System.Web.Configuration.HttpRuntimeSection.MaxRequestLength and Server.ScriptTimeout
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With