INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

ASP.NET 101

How can I upload larger files with ASP.NET? by link9
Posted: 21 Feb 03 (Edited 21 Feb 03)

By default, the file size limit on uploads in ASP.NET is 4mb.  Most of the time, the default 4Mb is more than enough to upload files using the POST method in webforms. But sometimes more is needed. The following example shows how.

To upload larger files through HTTP, you can use a configuration setting in your application Web config file or your machine Web config file:

<configuration>
    <system.web>
       <httpRuntime maxRequestLength="10000" />
       <authorization>
           <deny users="?"/>
       </authorization>
    </system.web>
</configuration>

where "10000" is the max file size in Kbytes that you want to allow.

This example was scraped from the following source:
http://www.dotnet4all.com/default.asp?NavID=514&NewsID=25&RubriekID=5&Dialog=NewsContent

They reported it coming from a newsgroup post.

And special thanks to member, TerryDad2, for cleaning up the solution a bit to get the capitalization correct.

Happy Coding!  
Paul Prewett

Back to Microsoft: ASP.NET FAQ Index
Back to Microsoft: ASP.NET Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close