temporarily increase size limit for DNN file uploads

Discussion in 'General troubleshooting' started by mike, May 30, 2011.

  1. Apologies in advance if this is a dupe, went looking and saw an older post that addressed earlier versions of IIS and DNN, but that will not work today.

    Had a need to install a large DNN extension ( > 40 MB) and ran into the default upload limitation on file size, so the upload failed.

    This site is configured per blueeyeddev's excellent posts and has the DNN installation in a subfolder.

    Here is what worked for me: add the following to the web.config in both the root and the DNN application directory, as the last child node of the <system.webServer> element:

    <security>
    <requestFiltering>​
    <requestLimits maxAllowedContentLength="1000000" ></requestLimits>​
    </requestFiltering>​
    </security>

    Since you're changing web.config there is no need to recycle the app pool, it works right away as soon as you save the change.

    Once you have uploaded your large file(s), best practice suggests removing this element to restore the default limitation on uploaded file size.

    hth
    --mike
     
  2. Ray

    Ray

    RequestFiltering has been an over looked element for ASP.Net. It does so many things for ones application. Such as setting certain securities and getting certain ASP.Net applications to run such as Razor. For those who gets weird off the beat errors with there web application I highly suggest also looking at RequestFiltering as the source of the problem. We may all benefit by going through this link and familiarizing ourselves with RequestFiltering.

    http://msdn.microsoft.com/en-us/library/ms689462(VS.90).aspx
     

Share This Page