I was doing some load testing from my laptop against a BizTalk application on a remote server, using LoadGen 2007 to generate XML messages that would be sent to a WCF service with WCF-NetMsmq binding hosted in a BizTalk receive location.
After a few heavy tests I ran into an out of memory exception, and so decided to shut down some memory hungry processes on my laptop before I resumed my testing. Much to my surprise once I started my tests (I was using Visual Studio/BizUnit 4.0 as a harness) I found that no messages were being sent to the queue, and my event log was full on errors with the following details – The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
I tried restarting the MSMQ service on both my local and the remote servers to no avail, and then tried restarting my laptop as well. In order to try isolating the fault I tried to run the same loadgen test against my local PC instead of the remote server, and that failed with the same error too. I tried running an integration test using BizUnit which didn’t make use of LoadGen to insert messages into both the local and the remote queue and that worked fine. There were no error messages whatsoever in the dead letter queues etc…
After almost getting ready to tear my hair out (what little is left…..very very little) I decided to uninstall and reinstall the MSMQ feature on my local PC and try again. Much to my surprise that fixed it.
I wonder whether there is something in the Msmq layer that perhaps identified LoadGen as being a suspicious party which might have been taking part in a DOS type attack, or whether it blocked it for some other reason. If this happens to me again I will make sure to investigate further and update this post.
Moral of the story (only applies on dev PCs of course) – if nothing else works then uninstall and reinstall (starting with the feature with least impact before moving further).