This article addresses an error associated with “ChannelOperationTimeout” when using Visual Studio to deploy SharePoint WSPs. The error in question looks like this:
Error occurred in deployment step ‘Activate Features’: A timeout has occurred while invoking commands in SharePoint host process.
Error occurred in deployment step ‘Add Solution’: A timeout has occurred while invoking commands in SharePoint host process.
So far, I have only ever got these error messages when working with C# code for SharePoint in Visual Studio. From my investigation and considering the unique situations when I have been hit with the above error, I can conclude that it is usually caused when…
- The server or virtual machine you’re working with is particularly slow or low on resources.
- The solution package in question that you’re attempting to deploy is very large so that the deployment time exceeds the default 2 minutes (120 seconds).
Fix it by setting ChannelOperationTimeout
The fix involves adding a key to the local machine registry (this key wouldn’t exist by default).
Using registry editor, go to the following key:
Or (if you’re working with Visual Studio 2013):
Add ChannelOperationTimeout as a DWORD with a value greater than 120. You may do a little trial and error to decide on the exact value you want to set. Don’t set it too high though, as this may impact performance.
After changing the registry, restart Visual Studio and your WSP should deploy without issues.
The ChannelOperationTimeout property gets or sets the time period within which an operation must complete or an exception is thrown. See here for more information.