Upload Large File to a Production Server in asp.net
Upload Large File to a Production Server using asp.net.A size restriction protects your application against "denial of service attack". Sometimes you want to upload large file onto web server using your web application, but the default setting IIS setting is very low. so you have to specify this in web.config file.
When we upload a file to server, a size restriction is actually sent to the server for uploading. The default size limitation is 4MB (4096KB). So, if the file size is more than 4MB then the transfer fails.
A size restriction protects your application against "denial of service attack". You want to prevent malicious users from uploading numerous large files to your Web server in an attempt to tie up all the available processes on the server. Such occurrence is called a "denial of service attack." It ties up the Web server's resources so that legitimate users are denied responses from the server.
You can usually change the default settings. To change the limit on the allowable upload file size, you make some changes in either the web.config file.
In the web.config file, find a node called
If there is no section with name
When changing the maxRequestLength property, be aware of the setting provided for the executionTimeout property. This property sets the time (in seconds) for a request to attempt to execute to the server before ASP.NET shuts down the request. The default setting is 90 seconds.