When we are developing custom code through Visual Studio 2010 for SharePoint 2010 sites and when we try to deploy the solution then we might see the below error.
"Error occurred in deployment step ‘Recycle IIS Application Pool’: The communication object, System.ServiceModel.InstanceContext, cannot be used for communication because it has been Aborted."
When I see this very first time and did not get any clue of what it is looking for and why it is not able to communicate to SharePoint sites. After doing some trail and error methods and checking Event Viewer, Logs etc... failed in all the ways in deploying the custom piece to SharePoint. Finally, a simple solution worked but didn't find any reason what is the main issue!
Solution:
"Error occurred in deployment step ‘Recycle IIS Application Pool’: The communication object, System.ServiceModel.InstanceContext, cannot be used for communication because it has been Aborted."
When I see this very first time and did not get any clue of what it is looking for and why it is not able to communicate to SharePoint sites. After doing some trail and error methods and checking Event Viewer, Logs etc... failed in all the ways in deploying the custom piece to SharePoint. Finally, a simple solution worked but didn't find any reason what is the main issue!
Solution:
- Sometimes when I do rebuild the project and deploy directly without doing "Package" from Visual Studio it is successful.
- If it is not successful then the only way I see is RESTART your visual studio and deploy.
- (From below comments: ) Restarting "Windows Management Instrument" service will work. (I haven't tested).
There is a solution to rid of it. You can just restart the "Windows Management Instrument" service. It will definitely resolve your problem.
ReplyDeleteThere is a solution to rid of it. You can just restart the "Windows Management Instrument" service. It will definitely resolve your problem.
ReplyDeleteThanks Khaniya.
ReplyDeleteNext time if I get this error, then will try and post it the result. Thanks for your contribution. Appreciate it.
Thank you! It saved me much of frustration!
ReplyDeleteThank you... it works....
ReplyDeleteRestarting the Windows Management Instrument service does not work.
ReplyDeleteRestarting Visual Studio is the only way that does work.