Uploading Large Files
You must do extra work when uploading large files. You don’t want to consume your entire server’s memory by placing the entire file in memory. When working with a large file, you need to work with the file in more manageable chunks.
First, you need to configure your application to handle large files. Two configuration settings have an effect on posting large files to the server: the httpRuntime maxRequestLength
and httpRuntime requestLengthDiskThreshold
settings.
The maxRequestLength
setting places a limit on the largest form post that the server can accept. By default, you cannot post a form that contains more than 4MB of data—if you try, you get an exception. If you need to upload a file that contains more than four megabytes ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.