Solved

File upload limit on IIS for a particular site

Posted on 2006-11-13
5
2,324 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
shambhusingh2004 earned 100 total points
ID: 17936277
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
ID: 17936286
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
ID: 17937450
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses

738 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