Solved

UPLOAD UTILITY FILE SIZE

Posted on 2013-01-23
2
444 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# HTTP GET method sample code 3 41
System.Speech 2 15
Device Location 3 13
Coding C# in Linux 8 33
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now