Solved

UPLOAD UTILITY FILE SIZE

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

26 Experts available now in Live!

Get 1:1 Help Now