ASP.net HTTP 404 – File not found instead of MaxRequestLength exception

I experienced this condition today (HTTP 404 on large file upload with IIS 7) but I thought I had made all the correct configuration settings. I wanted to upload files up to 300MB so I made the following web.config settings in a sub-folder of the application:

<configuration>
    <system.web>
        <httpRuntime maxRequestLength="307200" />
    </system.web>
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="314572800" />
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>

This configuration worked in test but when I copied the updated files including the web.config to the production server, I received the HTTP 404 error on uploading a 90MB file. Smaller files under the application-wide limit of 30MB were working fine, so I knew it was a request size problem of some sort.

I figured there was a chance IIS had cached some application settings and just hadn’t updated them, so I recycled the Application Pool, after which everything worked as expected.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)