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
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".
Update: In my case what helped was:
1) enabling trace logs: http://msdn.microsoft.com/en-us/library/ms732023.aspx
2) in the trace log it wrote this:
Binding validation failed because the binding's ExactlyOnce property is set to true while the destination queue is non-transactional. The service host cannot be opened. Resolve this conflict by setting the ExactlyOnce property to false or creating a transactional queue for this binding.
The answer says it all. Created a transactional queue - everything works :) hope it helps people :)
close your solution, Now follow these steps: 1. Right click on the visual studio. 2. Click on Run as Administrator. 3. Now open your solution. 4. Try running it, your problem will be resolved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With