Sometimes, when you run a Content Deployment job between a source farm and a destination farm, you may encounter the following issue:
“Content deployment job ‘Job Name’ failed. The remote upload Web request failed.”
When you look in the ULS logs, you may see the following:
File upload of ‘C:\Inetpub\wwwroot\SiteDirectory\ExportedFiles70.cab’ failed. Exception System.Web.HttpException: Maximum request length exceeded. at System.Web.HttpRequest.GetEntireRawContent() at System.Web.HttpRequest.get_InputStream()…
OK, let’s do a web search to see how to fix this issue. After some searching, you’ll come across posts that tell you to modify maxAllowedContentLength or MaxRequestLength attribute in the Central Administration web.config file (or maybe WFE’s too). Examples:
I’ve found that if you only modify web.config files as specified in the articles above, it will NOT solve the problem.
To solve this problem, you need to increase maxRequestLength value in three places on the TARGET farm:
- Central Administration web.config file (typically located in C:\Inetpub\wwwroot\wss\VirtualDirectories\DirectoryName)
- Your web application main web.config file (typically located in C:\Inetpub\wwwroot\wss\VirtualDirectories\DirectoryName).
- Content deployment web.config file located in:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\ADMIN\Content Deployment
Note: You can find out the correct paths for items 1 and 2 by opening IIS Manager.
Open web.config file located at each location and locate the maxRequestLength attribute. Increase it to allow upload of the largest CAB file that you have. The default setting limits the upload file size to 51200 KB for CA and web application and to 102400 KB for content deployment.
<httpRuntime maxRequestLength=”102400″ />
You can find out how large the largest CAB file is by running the following command on the source farm Central Administration server:
stsadm -o editcontentdeploymentpath -pathname (pathname here) -keeptemporaryfiles Failure
This setting will allow you to see the CAB files generated during the content deployment job (in the temp directory specified in the Content Deployment settings screen in Central Administration).