Solved

File upload limit on IIS for a particular site

Posted on 2006-11-13
5
2,311 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

810 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