Products and Services
Graffiti CMS
Learn more about our simple content publishing platform.
Harvest Reporting Server
Get business intelligence tools for measuring online behavior.
Professional Services
Consulting, creative, and Web services from the people who know Community Server best.
Solutions
Telligent
Learn more about our team at Telligent.com.
 

Allowing Users to Upload Files Greater Than 4 MBytes

To do this you need to add a httpRuntime element to the <system.web> section of the root web.config file. 

You must supply two configurable parameters to this new element:

  • executionTimeout="x"
  • maxRequestLength="y"

Where:

"x" is the number of seconds a request can execute before being shut down by ASP.Net. The default value under ASP.Net 2.0 is 110 seconds. For example, for a timeout of 5 minutes, enter executionTimeout="300". You must set this value to an upload size you set can complete, but you should not set it too high in case of a genuine error, so your users do not have to wait too long before being notified that the operation has failed.

"y" is the maximum size in KBytes that a user will be allowed to upload. The default value is 4096 (4 Mbytes). For example, for a maxmimum file upload size of 8 Mbytes, enter maxRequestLenght="8192". Avoid setting this to a size larger than you need. The sole purpose of this setting and restriction is to prevent denial of service attacks on your site by people flooding it with requests for large file uploads.

You should now determine suitable values for your requirements. Open the web.config file in the root folder of your site in your favourite text editor. Locate the closing </system.web> entry, around line (169).

Insert the following entry, using the values you have determined, just above the closing </system.web> entry as shown.

   <httpRuntime
        maxRequestLength="8192"
        executionTimeout="300" />
</system.web>

Save the file and exit the text editor.