Solved

UPLOAD UTILITY FILE SIZE

Posted on 2013-01-23
2
447 Views
Last Modified: 2013-01-23
How do I increase the the file upload to the maximun file size possible in ASP.NET.   I am uploading images and documents and would like to MAX out at 2 meg.

Please find the attach code behind.
Default.aspx.cs
0
Comment
Question by:BOEING39
2 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 340 total points
ID: 38812499
Default is 4mb but you can out an entry in your web.config to change the size, max possible is 2gb:

To change this size limit, you have to make some changes in the application's web.config:

<system.web>
   <httpRuntime  maxRequestLength="2048" executionTimeout="360"/>
 </system.web>

maxRequestLength - Attribute limits the file upload size for ASP.NET application. This limit can be used to prevent denial of service attacks (DOS) caused by users posting large files to the server. The size specified is in kilobytes. As mentioned earlier, the default is "4096" (4 MB). Max value is "1048576" (1 GB) for .NET Framework 1.0/1.1 and "2097151" (2 GB) for .NET Framework 2.0.

executionTimeout - Attribute indicates the maximum number of seconds that a request is allowed to execute before being automatically shut down by the application. The executionTimeout value should always be longer than the amount of time that the upload process can take.


http://www.bloggingdeveloper.com/post/Limiting-the-File-Upload-Size-in-ASPNET.aspx
0
 

Author Closing Comment

by:BOEING39
ID: 38812765
That did it, thank you.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question