SharedFilesDownload failing for large files

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
8/13/2007 3:56:20 PM
Gravatar
Total Posts 80

SharedFilesDownload failing for large files

Hi Joe,

I'm having problems with the SharedFilesDownload.aspx page.  The problems occur for large files (i.e. 300MB).  When I click on a the file to download in the shared files module I do not get a dialog prompting me to save the file.  Firefox browser loads the page for about 30 seconds before showing a page that says: "The connection was reset. The connection to the server was reset while the page was loading."  I have the httpruntime executionTimeout set approprieatly.  Any ideas on how to diagnose this problem are greatly appreciated.

The following message is logged in currentlog.config:

2007-08-13 11:01:16,595 [4980] ERROR mojoPortal.Web.Global [(null)] - /SharedFilesDownload.aspx?pageid=81&fileid=592&mid=139
System.Web.HttpException: The remote host closed the connection. The error code is 0x80072746.
at System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.FlushCore(Byte[] status, Byte[] header, Int32 keepConnected, Int32 totalBodySize, Int32 numBodyFragments, IntPtr[] bodyFragments, Int32[] bodyFragmentLengths, Int32 doneWithSession, Int32 finalStatus, Boolean& async)
at System.Web.Hosting.ISAPIWorkerRequest.FlushCachedResponse(Boolean isFinal)
at System.Web.Hosting.ISAPIWorkerRequest.FlushResponse(Boolean finalFlush)
at Brettle.Web.NeatUpload.DecoratedWorkerRequest.FlushResponse(Boolean finalFlush)
at System.Web.HttpResponse.Flush(Boolean finalFlush)
at System.Web.HttpWriter.TransmitFile(String filename, Int64 size, Boolean isImpersonating, Boolean supportsLongTransmitFile)
at System.Web.HttpResponse.TransmitFile(String filename)
at mojoPortal.Web.SharedFilesDownload.DownloadFile()
at mojoPortal.Web.SharedFilesDownload.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

The following message is logged in the Windows event log:

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 8/13/2007
Time: 10:30:39 AM
User: N/A
Computer: ATAWEB
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 8/13/2007 10:30:39 AM
Event time (UTC): 8/13/2007 5:30:39 PM
Event ID: 0257275b2dda49bcb5112bcb35c7436d
Event sequence: 22949
Event occurrence: 8855
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1267602825/Root-2-128314877691965228
Trust level: Full
Application Virtual Path: /
Application Path: C:\Inetpub\mojoportal\
Machine name: ATAWEB

Process information:
Process ID: 5180
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: HttpException
Exception message: The remote host closed the connection. The error code is 0x80072746.

Request information:
Request URL: https://my.company.com/SharedFilesDownload.aspx?pageid=81&fileid=592&mid=139
Request path: /SharedFilesDownload.aspx
User host address:
User:
Is authenticated: True
Authentication Type: Forms
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at mojoPortal.Web.Global.HandleException(Exception ex)
at mojoPortal.Web.Global.Application_Error(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.HttpApplication.RaiseOnError()

 

8/14/2007 3:09:07 PM
Gravatar
Total Posts 80

Re: SharedFilesDownload failing for large files

This is strange. If I enabling tracing in web.config downloading files from the shared files module works correctly.  When I disable tracing I get the behaviour described in my last post.

8/15/2007 11:29:14 AM
Gravatar
Total Posts 80

Re: SharedFilesDownload failing for large files

Hi Joe,

Any ideas?

Thanks,

Jesse

8/15/2007 12:20:48 PM
Gravatar
Total Posts 18439

Re: SharedFilesDownload failing for large files

Hi Jesse,

It sounds like a server configuration issue, strange that enabling trace resolves it but maybe some setting that happens normally doesn't happen during trace.

I googled "iis maximum file download size" and there is some info about hardware limitations.

As an experiment you might try something like this:

scriptTimeout = Server.ScriptTimeout;
Server.ScriptTimeout = int.MaxValue;

response write the file here

Server.ScriptTimeout = scriptTimeout;

Joe

8/15/2007 1:27:29 PM
Gravatar
Total Posts 80

Re: SharedFilesDownload failing for large files

Joe,

Thanks for the reply.  I think I've identified the problem. See http://www.brettle.com/NeatUpload-1.1/docs/Manual.html#LargeResponseNotBuffered for background information.  The NeatUpload module was causing the problem with the Response.TransmitFile() function.  I observed the file requested for download being buffered by the ASP worker thread which is not supposed to happen when using the Response.TransmitFile() function.  The solution is to disable the NeatUpload module for the SharedFilesDownload.aspx page in the Web.config file as follows:

<!-- This is necessary to prevent the webserver from buffering the download file
<location path="SharedFilesDownload.aspx">
<system.web>
<neatUpload useHttpModule="false" />
<httpRuntime maxRequestLength="2097151" executionTimeout="14400" />
</system.web>
</location>

-Jesse

8/17/2009 10:24:59 AM
Gravatar
Total Posts 1

Re: SharedFilesDownload failing for large files

I believe the web.config file needs to be updated because the SharedFilesDownload.aspx file no longer exists. If I'm not mistaken, the new file is SharedFiles/Download.aspx (with a slash). This "location" section should read:

<location path="SharedFiles/Download.aspx">
<system.web>
<neatUpload useHttpModule="false" />
<httpRuntime maxRequestLength="2097151" executionTimeout="14400" />
</system.web>
</location>

8/17/2009 11:09:06 AM
Gravatar
Total Posts 18439

Re: SharedFilesDownload failing for large files

That is completely commented out in the web.config. The sharedfiles download page is not involved with uploading files so its not a valid location to filter request length on anyway. Its really just example syntax. I will change it to just /SharedFiles/

Best,

Joe 

You must sign in to post in the forums. This thread is closed to new posts.