1

we are facing issue while uploading any assembly of sizelarger than 4 mb. We can ulpload smaller dll without any issue. see attched screenshot regarding maxRequestLength. I have checked tridion web.config and requestlimit is set to 60000000 which is very higher then 4 MB.

<requestLimits maxAllowedContentLength="60000000" />

is ther any other config require such change to make tcmupload assembly to work for dlls bigger then 4MB.

I have gone through various other tridion stack excahnge issues before asking the question here.

enter image description here

3 Answers 3

2

You have 3 available options to increase the file upload limit:

A) Modify the maxAllowedContentLength setting in the web.config (already suggested by Pankaj)

You can increase the maximum file size by modify the maxAllowedContentLength setting in the web.config file: With the above maxAllowedContentLength, users can upload files that are 2 GB in size. This setting will work right away without restart IIS services.

B) Edit the request filtering feature settings and the request limits using IIS manager

  1. Open IIS Manager.
  2. Select the website that you want to configure.
  3. Make sure you are in Features View per the button at the bottom of the manager.
  4. Select Requests Filtering and open it by double-clicking the icon. The Request Filtering pane displays.
  5. From the Actions pane on the right hand side of the screen click Edit Feature Settings... link. The Edit Request Filtering Settings window displays.
  6. In the Request Limits section, enter the appropriate Maximum allowed content length (Bytes) and then click the OK button.
  7. Restart IIS.

C) Manually edit the ApplicationHost.config file

  1. Click Start. In the Start Search box, type Notepad. Right-click Notepad, and then click Run as administrator.
  2. On the File menu, click Open. In the File name box, type %windir%\system32\inetsrv\config\applicationhost.config, and then click Open.
  3. In the ApplicationHost.config file, locate the node.
  4. Remove the maxAllowedContentLength property. Or, add a value that matches the size of the Content-Length header that the client sends as part of the request. By default, the value of the maxAllowedContentLength property is 30000000.

For example, modify the following configuration data inside the section. " />

  1. Save the ApplicationHost.config file.

Let me know if this helps.

2

As also apparent from the error in the screen shot - you also need to increase the value of maxRequestLength along with maxAllowedContentLength. Something similar to as below:

<requestLimits maxAllowedContentLength="60000000" maxRequestLength="60000000"/>

I hope this resolve your issue.

0

As well as the maxAllowedContentLength attribute of the requestLimits element, you may also want to try setting the maxRequestLength attribute on the httpRuntime element. For example:

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">      
    <system.web>
        <!-- This value is in **kilobytes** -->
        <!-- 512000 kilobytes = 500MB -->
        <httpRuntime executionTimeout="1200" maxRequestLength="512000" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>
    </system.web>
    <system.webServer>
        <security>
        <requestFiltering>
            <!-- This is the value in **bytes** -->
            <!-- 524288000 bytes = 500MB -->
            <!-- The maximum for this is 4,294,967,295 (3.99GB) - http://stackoverflow.com/questions/4022434/-->
            <requestLimits maxAllowedContentLength="524288000" />
        </requestFiltering>
        </security>
    </system.webServer>    
</configuration>

PLEASE NOTE: One of these values is in kilobytes, and the other in bytes - Pesky Microsoft!

According to the associated httpRuntime Element MSDN article, the maxRequestLength attribute:

Indicates the maximum file upload size supported by ASP.NET. This limit can be used to prevent denial of service attacks caused by users posting large files to the server. The size specified is in kilobytes. The default is 4096 KB (4 MB).

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.