Increase Upload File Size in IIS 7.0

I developed a ASP.NET web application that can upload around 2 MB files from client location to server folder. This application was working fine in my test environment on IIS 7.0. But once I moved that application into my web server which had MS-Windows 2008 server and it gave me an error saying that file size is too high to upload file. Which is requred to increased the "maxAllowedContentLength" and "headerLimits" size. Inserting below code into your web config file you can specify these parameters.

<requestlimits maxallowedcontentlength="2097151">
<headerlimits><add header="Content-type" sizelimit="2097151">

Also you can increse "maxRequestLength" in httpRuntime tag using following code part.

<httpruntime apprequestqueuelimit="100" minlocalrequestfreethreads="4" minfreethreads="8" usefullyqualifiedredirecturl="false" maxrequestlength="2097151" executiontimeout="1200">

No comments:

Post a Comment


Related Posts with Thumbnails

Twitter Updates

    follow me on Twitter