[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1582
  • Last Modified:

Connection interrupted while uploading large files in browser (.NET application)

I have a website which allows users to upload large video files. Some of these files can be over 50MBs.

I've updated the web.config file to allow for files up to 2GB to upload (and run for 60 minutes):
<httpRuntime maxRequestLength="2048000" executionTimeout= "3600"  />

I can upload a 20MB file but when I try uploading an 80MB file, the browser times out and displays this error:

Connection Interrupted
The connection to the server was reset while the page was loading.
The network link was interrupted while negotiating a connection. Please try again.

What else can i do to ensure that the connection will be interrupted? Are there changes in IIS that can be applied? To the server itself (Windows Server 2003 / SQL Server 2005)?

Thanks.        
       
     


     
     
0
bearclaws75
Asked:
bearclaws75
  • 4
  • 2
1 Solution
 
AsishRajCommented:
in your webconfig increase your connection timeout.
0
 
AsishRajCommented:
Some Custom Upload modules that u can use

http://www.dotnetjunkies.com/Tutorial/81E0C3A9-1B40-425C-B150-B578FE724A39.dcik 

http://www.codeproject.com/KB/aspnet/FlashUpload.aspx 

http://www.codeproject.com/KB/aspnet/multiuploads.aspx

Also try using
<httpRuntime maxRequestLength="2048000"  />

let us know what is the outcome. Also if you can keep track of how much data was uploaded and after how long the error occurred. this can point to where you should be looking into to solve it
0
 
bearclaws75Author Commented:
I updated my web.config (and machine.config) to use the following settings:

      <httpRuntime executionTimeout="7200" maxRequestLength="2048000"
      useFullyQualifiedRedirectUrl="false"
      minFreeThreads="8" minLocalRequestFreeThreads="4"
      appRequestQueueLimit="100" />

In IIS, I set the "connection timeout" value to "7200".

Now, I receive a new error. This error is actually a .NET error (not a browser error).

It states that the maximum request length has been exceeded, however, the maxRequestLength is set to 2GB and the file I am uploading is only 50MB.

Any ideas?

Server Error in '/' Application.
 
Maximum request length exceeded.
 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.Web.HttpException: Maximum request length exceeded.
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
 
Stack Trace:
 
[HttpException (0x80004005): Maximum request length exceeded.]
   System.Web.HttpRequest.GetEntireRawContent() +3315778
   System.Web.HttpRequest.GetMultipartContent() +56
   System.Web.HttpRequest.FillInFormCollection() +222
   System.Web.HttpRequest.get_Form() +65
   System.Web.HttpRequest.get_HasForm() +3309630
   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +45
   System.Web.UI.Page.DeterminePostBackMode() +65
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +133

Open in new window

0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
AsishRajCommented:
if you are using cookieless session then use

useFullyQualifiedRedirectUrl = "True"


0
 
AsishRajCommented:
another thing i would suggest is look into IIS Log File to see the exact error. also if you can catch the error in the application then you will know exactly whats happening
0
 
bearclaws75Author Commented:
We were unable to fix this via the server or application configuration settings. We decided to you an existing 3rd party uploader to resolve this issue.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now