How to upload up 10gb file on ASP.NET

2020-02-12 18:30发布

问题:

I have done a application on asp.net and I'm saving a video and audio file is sql server i have a issue with uploading big file over on sever. appls is hosted on ISS7 here i used a code in web.config file that is a below:

<httpRuntime executionTimeout="3600" maxRequestLength="102400"/>

and

  <system.webServer>
    <security>
      <requestFiltering>        
        <requestLimits maxAllowedContentLength="1024000000"/>
      </requestFiltering>
    </security>
  </system.webServer>

but im getting error on uploading time that is below in image:

please help me out how can i upload files up to 10GB with ISS7 10GB file im save ing as a varbinary(MAX) and 10GB was converting in Byte

回答1:

With out-of-the-box ASP.NET, you are not going to be able to upload a file that big, because IIS will either timeout or you will exceed the size limitations (read: maxRequestLength setting for IIS).

You have a few options:

  1. Custom HTTP module

    NeatUpload is a free option.

  2. Silverlight/Flash option

    SWFUpload is a free option.

  3. Asynchronous chunking option

    RadAsyncUpload - Telerik's ASP.NET AsyncUpload is a pay option, check website for pricing.



回答2:

<httpRuntime executionTimeout="3600" maxRequestLength="102400"/>

is about 10Mb (maxRequestLength is in Kb - see http://msdn.microsoft.com/en-us/library/e1f13641(v=vs.100).aspx)

You try set it to 10485760...