Solved

File upload limit on IIS for a particular site

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

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

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

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

717 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