How to guarantee file upload won't crash server?

S

Steve

ASP.NET 2.0 - IIS 5.0

I am using the asp.net 2.0 file upload control in my application. Users
can upload files up to 4MB. i.e. I just kept the default. If someone
maliciously tries to upload big files of say 200MB is order to try and
drain server resources and crash the site, will IIS cut him off at 4MB
i.e. only dedicate 4MB of RAM to the upload?

I am basically afraid that users may be able to easily crash the site,
and thinking of what I can do about it codewise.

Steve.
 
K

Kevin Spencer

Hi Steve,

In your web.config file, you can control the maximum size of uploaded files
with the following element:

<httpRuntime maxRequestLength="4096" />

The value is the maximum number of KB allowed, in the example, 4 MB.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Development Numbskull

Nyuck nyuck nyuck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top