Previously one of our (GSA Client) clients file upload application is in ASP. Now we are planning to convert it into .Net. When I convert and upload a large file, I started getting errors, the same file I used to upload easily in ASP??
15 min I pulled my hair to solve this error! After some time I realized maxRequestLength in httpRuntime is causing the problem. Haa… some times brain won’t react early to identify the issues!!
If any one of you are using file upload functionality in your applications and if you ignored maxRequestLength settings, then please be sure to check it once. By default the maxRequestLength will be 4096KB (4 megabytes). After changing of that parameter, application started working well.
If you are more curious on it, here is the explanation:
At runtime the .Net framework checks the maximum size for the request object. This information will be obtained from the application's configuration file. In case, if this limit is not specified in web.config file, then it will be obtained from machine.config file. By default this limit is set to 4096KB. So by default you can upload only 4096KB file only! If you are interested to give a capability to the user to upload a file has greater size (> than 4096KB), then be sure to change 'maxRequestLength' value.
By the way, if you need here is the syntax:
Hope it helps to some one!
Also if any of you are already implemented a functionality of uploading large files, please share your experience on performance etc. Bcz.. in my client case, he is uploading files size ranging from 40MB and we are keeping them in database!
If you have any suggestions.. Please share them!!
Also I found related content on it at support, it's @ support link: