Solved

File upload limit on IIS for a particular site

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 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

12 Experts available now in Live!

Get 1:1 Help Now