When you try to deploy web parts to Share Point within Visual Studio following error might appear:
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.
If you see this the error there is nothing to do with the server. You do not need to restart it or to perform iisreset or similar. If you ever worked with WCF you will notice that this error is coming from WCF. Interestingly Visual Studio has internally created WCF proxy to deployment service hosted in IIS. Because of some bug in VS Project Template which is responsible to perform deployment operation this error will not disappear until the proxy is recreated. The bad thing is that VS project template is using a global instance of the proxy which can be recreated only if Visual Studio is restarted.
Hope Microsoft responsible guys will take this as recommendation to create the proxy each time deployment is requested by developer.
Shortly, to workaround this issue restart Visual Studio.
Posted
Jul 13 2011, 12:12 PM
by
Damir Dobric