ASP.NET - fileupload - Asked By goldy gupta on 30-Dec-11 02:43 AM

helo to all i have an web application

I have file upload
when i am uploading the file of heavy sizes say 200mb--1 gb
Its taking lot of time..
Is there any other way to upload fast in Asp.Net
dipa ahuja replied to goldy gupta on 30-Dec-11 03:07 AM
It will take time , as per the size of the file, if you want to change the max size property then you can change in web.config
By default, the maximum size of a file to be uploaded to a server using the ASP.NET FileUpload control is 4MB. You cannot upload anything that is larger than this limit.
To change this size limit, you have to make some changes in the application's web.config:
  <httpRuntime  maxRequestLength="102400" executionTimeout="360"/>
maxRequestLength - Attribute limits the file upload size for ASP.NET application. This limit can be used to prevent denial of service attacks (DOS) caused by users posting large files to the server. The size specified is in kilobytes. As mentioned earlier, the default is "4096" (4 MB). Max value is "1048576" (1 GB) for .NET Framework 1.0/1.1 and "2097151" (2 GB) for .NET Framework 2.0.
executionTimeout - Attribute indicates the maximum number of seconds that a request is allowed to execute before being automatically shut down by the application. The executionTimeout value should always be longer than the amount of time that the upload process can take.

Anoop S replied to goldy gupta on 30-Dec-11 05:07 AM
there will be file size limit in the which controls the size to be uploaded and your large file could be over 8MB
change the maxRequestLength in the web.config to increase but I would prefer to have this to be efault unless you really require to uplad large files and those can be handled differently from the website may be providing ftp and some other ways...

See the following article to upload large files in Asp.Net

Hope it helps.