Solved

File upload limit on IIS for a particular site

Posted on 2006-11-13
5
2,299 Views
Last Modified: 2010-05-18
Hi All,

Environment: Windows Server 2K3, IIS 6.0, ASP.Net 2.0, Intranet site

Requirement: Site has to provide interface to upload 100 MB - 650 MB files on the web server (or file server).

Problem: Client has got few more sites hosted on the IIS and client has restricted the file size (to be uploaded) to 2MB. Client do not want to change this setting on server.

Considering the above scenario
1. Can we change this setting for a site on IIS? (instead of affecting the server can we change it for a particular site)
2. Can we change it programatically?
3. Any work around to this?

Please help urgently.

Thanks a ton in advance.

Best regards,
Rajesh Khatri
0
Comment
Question by:rj_khatri
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
shambhusingh2004 earned 100 total points
Comment Utility
Hi Rajesh -
No,There is no way to restricted upload size limit only for a site in IIS becuase it operate through
through 'metabase.xml' file.You can restricted ASP upload size for all site through 'Merabase.xml' file

Steps :

Go to 'C:\WINDOWS\system32\inetsrv' and find 'Metabase.xml' file
Search text "AspMaxRequestEntityAllowed="204800"
And assigned size limit.

Warm Regards,

Vipin Gupta
0
 
LVL 6

Expert Comment

by:shambhusingh2004
Comment Utility
Hi Rajesh –

No, there is no way to restricted upload size limit only for a site in IIS because it operate through
'metabase.xml' files. You can restrict ASP upload size for all sites through 'Merabase.xml' file

Steps:

Go to 'C:\WINDOWS\system32\inetsrv' and find 'Metabase.xml' file
Search text "AspMaxRequestEntityAllowed="204800"
And assigned size limit.

Warm Regards,

Vipin Gupta
0
 
LVL 10

Assisted Solution

by:AndresM
AndresM earned 100 total points
Comment Utility
shambhusingh2004 is right, but AspMaxRequestEntityAllowed only works for ASP code. If you are using ASP.NET 2.0, you can put the limit programmatically. By default, the limit is 4mb for the FileUpload Control.

Working Around File Size Limitations

You may not realize it, but there is a limit to the size of a file that can be uploaded using this technique. By default, the maximum size of a file to be uploaded to the server using the FileUpload control is around 4MB. You cannot upload anything that is larger than this limit.

One of the great things about .NET, however, is that it usually provides a way around limitations. You can usually change the default settings that are in place. To change this size limit, you make some changes in either the web.config.comments (found in the ASP.NET 2.0 configuration folder at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG) or your application's web.config file.

Uploading Files in ASP.NET 2.0
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/UploadASP2.asp

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Here are the symptoms: You start receiving calls from users that one of your legacy web apps isn't coming up, so you log into your IIS 5 server to check it out.  When you pull up the services, you notice that the WWW Publishing service isn't runn…
Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

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

11 Experts available now in Live!

Get 1:1 Help Now