Trig to accomplish big file uploads in IIS 7

Posted on 2010-01-03
Last Modified: 2012-05-08
I have a web app that lives on a Windows 2008 server that is being served with IIS 7. I have been struggling with letting users upload files of 100 mb and higher. I ran appcmd.exe to modify the  maxAllowedContentLength property to 1073741824 which is 1 GB inbytes. I also modified my web.config with the entry below. After doing so I found that any users that access the website while vpn'd into to our network are able to perform uploads of 100mb and higher.

However, when users access the site out of network they still have problems. The site basically comes to a stalemate when trying to perform the upload and it eventually throws a dns or server error. Checking the event logs on the server still points to a file size issueas there are events that show "Maximum request length exceeded" and "Post size exceeded allowed limits" .

I am not sure why it would matter from where the website was being accessed if filesize was the issue.
(Although I could see how bytes going accross the wire could be an issue) Is there another setting related specifically to IIS 7 or Windows Server 2008 that I could be missing?  Any help or direction would be greatly appreciated.



                <requestLimits maxAllowedContentLength="1073741824" /> 




Open in new window

Question by:jazzcatone
    LVL 31

    Accepted Solution

    During the upload process of large files, built-in ASP.NET loads the whole file in memory before the user can save the file to the disk. Therefore, the process may recycle because of the memoryLimit attribute of the processModel tag in the Machine.config file. More info you can find in Microsoft KB article:;EN-US;295626

    Author Comment

    The processModel tag doesn't seem  appear to exist in IIS 7 in the machine conig. Also unfortunately this is a .NET 2.0 app and your article only lists it as applying to Microsoft ASP.NET 1.1 and Microsoft ASP.NET 1.0. Is there a way to check and see if memory consumption is the issue in  IIS-7 ?? Also note there are actually a few configuration files in iis 7 (ApplicationHost.cofig, web.config, machine.config) Also not sur why it wld matter from a memory tandpoint if the user were in or out of network.
    LVL 31

    Assisted Solution

    by:James Murrell
    Microsoft recommends that you use a maximum file size in the range of 10 to 20 megabytes (MB). If you rarely upload files, the maximum file size may be 100 MB.

    also have you read
    LVL 37

    Assisted Solution

    Is it possible that the uploads are failing over VPN due to time-out of the request?  Perhaps file uploads take longer over VPN due to limited bandwidth, and are exceeding the allowed time for application pool or server timeout?


    Author Comment

    Users who are vpn'd in are infact able to do the uploads. It is the out of network users who have problems. However it seems to be isolated to bigger uploads for out of network users. Smaller filesizes seem to work out of networ as well.
    LVL 37

    Assisted Solution

    Ahh, OK.

    In that case, is the internal and external access via different web sites in the IIS admin?  Sometimes the inside (intranet) is set up as a different web site than from external, even though they may both point to the same physical web content.  If that is the case, then is it possible that you are modifying the maxAllowedContentLength only on one of those web sites?

    Cheers,  Mike.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    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…
    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…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    761 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

    10 Experts available now in Live!

    Get 1:1 Help Now