Sometimes when deploying an Azure project to the local compute emulator I’ve seen this error message.

“The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state."

It’s a horrible error and I haven’t been able to fix it using any of the methods found via google (e.g. “your web.config may be readonly” or “your project might have too many files in it”).

The only solution I’ve found is to do a fresh checkout of the source code from TFS

Fix

Go to Source Control Explorer, right click on your collection and select Advanced – Remove Mapping

Remove Mapping

 

Now enter a new Local folder and click Change.

ChangeBinding

After a short time, Visual Studio will pull down a fresh copy of your source code into this new folder.

I have found that the next time I build and run the project, the error doesn’t appear and everything works as it should.

 

Source code, step-by-step tutorials, videos and more

I've compiled a whole load of useful tutorials, source code for articles (like this one) and mini video series to help you push through all the noise and build better ASP.NET web applications, faster.

Drop your email in the box below to get new posts first, and instant access to 'the vault'.

I respect your email privacy. Unsubscribe with one click.