How to upload large/big files in asp.net ?
In Previous posts i have explained about simple example for UPLOADING FILES IN ASP.NET and UPLOADING DOC / DOCX FILES IN ASP.NET . Actually the default maximum size of files that can be uploaded in ASP.NET is 4MB ( 1024*4 maxRequestLength=4096 ) . So, if we try to upload the files more than 4MB , then it will give a runtime error . We can also change the maxRequestLength by writing a Line of code in Web.Config file. For this , for example if we want to accept the maximum file size is 500MB then, we have to write
<system.web> <httpRuntime executionTimeout="3600" maxRequestLength="512000"/> </system.web>
The above code accepts the maximum file size of maxRequestLength= 500MB (500*1024) . Hence we can set the maxRequestLength as per our our requirements.
No comments:
Post a Comment
Thanks for your comments.
-Sameer