Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

UPLOAD UTILITY FILE SIZE

Posted on 2013-01-23
2
Medium Priority
?
454 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 1360 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Loops Section Overview
Suggested Courses

885 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