Navigation

Tuesday, 2 February 2010

IIS7 broke my Content Deployment! (404 - Not Found error)

Important one to bear in mind this, especially as SharePoint 2010 is likely to have the same limitation (IIS7!)


Content Deployment works by creating exports of the Site Collection data, and splitting it up into CAB files with a default size of 10MB. These are then shipped off to the target Central Admin Application (using a Layouts page called DeploymentUpload.aspx). Once all the CAB files have been received they are imported into the database of the target site collection.

All very simple, but what do you do when your Content Deployment job starts throwing errors like "404 - Not Found"?? (note - Content Deployment errors end up in the Windows Application Logs).

Well, the first place to look would be your IIS logs for your Central Administration application (which for IIS7 are located in the C:\inetpub folder). Look for a reference to "DeploymentUpload.aspx" with a 404 error reference.. which I have an example of below:
2010-02-02 10:16:29 ::1 POST /_admin/Content+Deployment/DeploymentUpload.aspx filename=%22ExportedFiles18.cab%22&remoteJobId=%22b8a556bc-8eef-4f6f-97b6-6bac54ae8d99%22 40197 - ::1 - 404 13 0 78
Now, I have highlighted the error fragment which states that this is a 404.13 error (or Content Length Too Large)! The reason for this is that one of the CAB files is too big, and IIS7 has a file upload limit of about 27MB!

Now, the quick witted among you will remember I said that the CAB files automatically split up into 10MB chunks .. but if MOSS comes across a file that is too big it will simply expand the file size until it can fit that file in!! In the case of a project I'm working on this lead to a 68mb CAB file!

The only workaround is to configure the IIS7 Virtual Directory for Central Administration to allow file uploads big enough for my CAB file to get through (in my case, I set it to 80,000,000 bytes, approx 75MB).

To do this, open up a command prompt, navigate to C:\Windows\System32\Inetsrv\ and execute the following command:

appcmd set config "SharePoint Central Administration v3" -section:system.webserver/security/requestFiltering -requestLimits.MaxAllowedContentLength:80000000

Restarted the Content Deployment job and all good .. working again :) So something to bear in mind ... why IIS7 can break your Content Deployment Jobs!!

No comments:

Post a Comment

This blog has been moved to www.martinhatch.com

Note: only a member of this blog may post a comment.