Server Administration

Upload limits within IIS7

By default, IIS7 will restrict uploaded greater than 30mb. To overcome this, the following settings can be added to the web.config file within your web application.

            <requestLimits maxAllowedContentLength="157286400" />

The value for the maxAllowedContentLength attribute should be specified in bytes (MB to Bytes Conversion).

See Error message when you visit a Web site that is hosted on a server that is running Internet Information Services 7.0: “HTTP Error 404.13 – CONTENT_LENGTH_TOO_LARGE”.

It can also be helpful to define the maxRequestLength and executionTimeout attributes.

    <customErrors defaultRedirect="~/Error.aspx" mode="On">
        <error statusCode="404" redirect="~/Error.aspx" />
    <pages />
    <globalization culture="en-GB" uiCulture="en-GB" />
    <sessionState timeout="60" cookieless="AutoDetect" />
    <httpRuntime executionTimeout="300" maxRequestLength="150000" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />

Leave a Reply

Your email address will not be published. Required fields are marked *