Thursday, March 8, 2012

ASP.net File Uploader Unknown Server error: Resolved

In Asp.net file uploder(synchronous ,asynchronous) we normally set the

<httpRuntime executionTimeout="600" maxRequestLength="512000">

maxRequestLength = my max file size (KB)
but When I upload the file bigger than 30 MB then I got flowing error


reason is IIS 7.5 by default not allow uploading file bigger than 30MB .
so you have to override the flowing IIS setting in <system.webServer  section

<security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="524288000" />
      requestFiltering>
security>
 

524288000 ==my max file size. (KB)

No comments: