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.

 

Want to learn ASP.NET Core?

  • Want to learn ASP.NET Core but don't know where to start?
  • Don't have time to keep up with everything Microsoft is putting out?
  • Stuck on legacy apps when you want to build something new?

Pop your details in the boxes below and get regular updates from me about all things ASP.NET Core.

LinkedIn
Reddit