The content here is basically coming from an article in MSDN, the title is ""
How to upload a file to a web server in asp.net by using Visual Basic .NET
"If there is no problem in English, Redirect is good. IIS 6.0 using Windows2003 is limited to the size of the file upload, which makes the server more secure. The default ASP upload size is 200K, and the ASP.NET has a size of 4m. There are many articles on the Internet how to break through the IIS 6.0 uploading article restrictions, in fact, file uploading for the ASP page, and how to do in the .NET environment, I used Google to search for an afternoon, I didn't find a Chinese, Wanner helpless, see English, I have to search English on my neck, I finally found a comparative standard answer on Microsoft's MSDN. Dare to enjoy exclusive, dedicated to friends who are in English as I am.
By default, ASP.NET allows upload to the web server to be less than or equal to 4096K, that is, 4M, if the uploaded file is greater than the set value, then you will see "I can't find the server or DNS" in the browser page. Error information such as it will make you confused, huh, huh. If you want to upload a bigger file, you must modify the value of the
Such as:
This way to upload can be less than or equal to 400m. After the file is modified, you can take effect immediately without having to restart IIS.
Sometimes, we hope that the entire server can be loaded uploaded, so you can modify the value of the
The value in web.config can override the settings in Machine.config.
Because the ASP.NET first reads the entire file into the memory, then write the disk, so the uploaded file will make the server overwhelmed.