asp.net file upload The connection to the server was reset while the page was loading

Abhi picture Abhi · Dec 18, 2012 · Viewed 13.8k times · Source

When I am trying to upload file of 32MB, firefox is showing following error on page.

" The connection was reset. The connection to the server was reset while the page was loading."

I have tried foll. solutions -

1 . in <system.web>

<httpRuntime maxRequestLength="2000000000" executionTimeout="999999"/>

2 . in <system.webserver>

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

and

<compilation defaultLanguage="c#" debug="false" />

but still getting same error. I think problem is related to "executionTimeout". Application is not setting this timeout for request.

Answer

Abhi picture Abhi · Dec 19, 2012

Finally problem resolved... We need to keep both tags in config file. i.e.

<httpRuntime maxRequestLength="2000000000" executionTimeout="999999"/>

and

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

Actually I was commenting one line and testing with another. :)