How can I limit the maximum size of the uploaded files?

Jaroslav Kordula asked on August 20, 2008 03:47

How can I limit the maximum size of the uploaded files?

Correct Answer

Jaroslav Kordula answered on August 20, 2008 03:47

You can specify max file size by setting max request length parameter in the web.config file. Please open the web.config file, find the <system.web> section and insert the following line into it:

<httpRuntime maxRequestLength="8000"/>

This will increase the max file size to 8MB. You can find more information at: http://msdn2.microsoft.com/en-us/library/e1f13641(vs.71).aspx.
Please see also The IIS6/7 is set by default to allow only 30MB files to be uploaded article.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.