Wcf – System.ServiceModel.ServiceHost, cannot be used for communication because it is in the Faulted state

msmqwcf

Receiving this error when trying to work with the queue:

Unexpected error occured: The communication object, System.ServiceModel.ServiceHost, cannot be used for communication because it is in the Faulted state.
at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)

How to overcome it?

Update: answer to my solution posted at the end

Best Answer

This problem is due to access rights. Start Visual Studio with administrative rights and the problem will be resolved. To start Visual Studio with admin rights right click the Visual Studio icon and select "Run As Administrator".