diff --git a/support/developer/webapps/iis/site-behavior-performance/http-404-13-website.md b/support/developer/webapps/iis/site-behavior-performance/http-404-13-website.md index dfcc5ca6e7c..4f1dab4358c 100644 --- a/support/developer/webapps/iis/site-behavior-performance/http-404-13-website.md +++ b/support/developer/webapps/iis/site-behavior-performance/http-404-13-website.md @@ -5,16 +5,16 @@ ms.date: 04/17/2020 ms.custom: sap:Site Behavior and Performance\Runtime errors and exceptions, including HTTP 400 and 50x errors ms.reviewer: mlaing --- -# HTTP Error 404.13 - CONTENT_LENGTH_TOO_LARGE when you visit a web site that is hosted on a server that is running IIS 7.0 +# HTTP Error 404.13 - CONTENT_LENGTH_TOO_LARGE when you visit a web site that is hosted on a server that is running IIS 10.0 and later versions This article helps you resolve the error (HTTP Error 404.13 - CONTENT_LENGTH_TOO_LARGE) that occurs when you visit a website in Internet Information Services (IIS). -_Original product version:_   Internet Information Services 7.0 +_Original product version:_   Internet Information Services 10.0 and later versions _Original KB number:_   942074 ## Symptoms -Consider the following scenario. You have a web site that is hosted on a server that is running IIS 7.0. When a user visits this web site, the user receives an error message that resembles the following error message: +Consider the following scenario. You have a web site that is hosted on a server that is running IIS 10.0 and later versions. When a user visits this web site, the user receives an error message that resembles the following error message: > Server Error in Application "**application name**" > HTTP Error 404.13 - CONTENT_LENGTH_TOO_LARGE @@ -23,11 +23,29 @@ Consider the following scenario. You have a web site that is hosted on a server ## Cause -This problem occurs because the client request contains a `Content-Length` header that is larger than the value that is specified for this header in the `maxAllowedContentLength` property in the *ApplicationHost.config* file. +This problem occurs because the client request contains a `Content-Length` header that is larger than the value (in bytes) that is specified for the `maxAllowedContentLength` attribute in the *ApplicationHost.config* file or the site-level *web.config* file. ## Resolution -To resolve this problem, follow these steps: +To resolve this problem, use one of the following methods. + +### Method 1: Update the site-level web.config file (recommended) + +Add or update the `maxAllowedContentLength` attribute in your site's *web.config* file. Set the value (in bytes) to match or exceed the size of the `Content-Length` header that the client sends. By default, the value of `maxAllowedContentLength` is 30000000 bytes (approximately 28.6 MB). + +For example, to allow up to 50 MB, add the following inside the `` section of your *web.config* file: + +```xml + + + + + + + +``` + +### Method 2: Edit the ApplicationHost.config file (server-wide) 1. Select **Start**. In the **Start Search** box, type *Notepad*. Right-click **Notepad**, and then select **Run as administrator**. @@ -37,9 +55,9 @@ To resolve this problem, follow these steps: 2. On the **File** menu, select **Open**. In the **File name** box, type `%windir%\system32\inetsrv\config\applicationhost.config`, and then select **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. +4. Set the `maxAllowedContentLength` attribute to a value (in bytes) that matches or exceeds the size of the `Content-Length` header that the client sends as part of the request. By default, the value of `maxAllowedContentLength` is 30000000 bytes (approximately 28.6 MB). Alternatively, remove the attribute to revert to the default value. - For example, modify the following configuration data inside the ``section. + For example, modify the following configuration data inside the `` section: ```xml