Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any dangers in increasing the executionTimeout and maxRequestLength of an ASP.NET site?

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?

like image 216
Johnathan Sewell Avatar asked Mar 11 '11 11:03

Johnathan Sewell


1 Answers

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

like image 108
Zach Green Avatar answered Sep 28 '22 01:09

Zach Green