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 extension 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

The above code accepts the maximum file size of maxRequestLength= 500MB   (500*1024) . Hence we can set the maxRequestLength as per our  our requirements.