Skip to content

How to Enable Large File Uploads in IIS 7 (& DNN)

by on November 1, 2010

Getting a mysterious upload error in your web application? Windows server 2008 IIS 7 has a default file upload size of 30 MB. To override this you need to add the following setting to the web.config file.

Add Security Setting to Web.Config

Go the the website application’s web.config file on the server and add the following to the <system.webServer> section:

<security>
<requestFiltering>
<requestLimits maxAllowedContentLength=”2000000000″ />
</requestFiltering>
</security>

For DNN you also need to specify the following in the web.config

<!– allow large file uploads –>

<httpRuntime useFullyQualifiedRedirectUrl=”true” maxRequestLength=”1024000″ requestLengthDiskThreshold=”2000000000″ />

Or, if your issue is timing out on uploads (for example, due to a poor connection) and you do not mind that there is some kind of security/performance risks associated, you can change the timeout as well:

<httpRuntime useFullyQualifiedRedirectUrl=”true” executionTimeout=”1920″ maxRequestLength=”2048000″ requestLengthDiskThreshold=”2000000000″ />

Feel free to change the requestLengthDiskThreshold, but maxRequestLength should stay the same!

NOTE: watch your quote marks!

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: