2

I have a web site on IIS7. I can upload a maximum of 100KB, but if I try any files larger than 100K then I get a timeout error.

I have added following setting to my web.config file but I am getting the same error:

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

What could be wrong?

Kev
  • 118,037
  • 53
  • 300
  • 385
onder
  • 795
  • 3
  • 14
  • 32

2 Answers2

0

You might also want to check your <httpRuntime> element in the web.config to ensure that it isn't limiting your request size there.

Mitchel Sellers
  • 62,228
  • 14
  • 110
  • 173
0

Try increasing the HttpServerUtility.ScriptTimeout property. You can do this in your script:

Server.ScriptTimeout = 300; // Set timeout to 300 seconds

Or you can configure in your web.config in:

<configuration>
  <system.web>
    <httpRuntime 
       executionTimeout = "300"
    />
  </system.web>
</configuration>

For more info see:

httpRuntime Element (ASP.NET Settings Schema)

Kev
  • 118,037
  • 53
  • 300
  • 385