2

I am using wondows 2008 standard OS.we have private queue ,in that message is published by another application.And we have WCF subscriber to poll the message from private queue and deliver to another system...

after some time WCF subscriber(installed as windows service) stops polling the message from Queue.when I go to close the window service then I get the error in windows logs error is:-

Blockquote

Failed to stop service. System.ServiceModel.CommunicationObjectFaultedException: 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) at Microsoft.Samples.MSMQToWCF.SubscriberWindowsService.OnStop() at System.ServiceProcess.ServiceBase.DeferredStop()

I am really clueless...i don't see any error in our application logs.. even though I attached Error Handler derived from IErrorHandler..but don't see any log there...because it maight not be excpetion in our code....

I suspect listening channel of the queue is breaking so Subscriber is stopped but still service runs..if that is the case how to reset the channel again???

Any other clue????

Please help me...

samash
  • 757
  • 2
  • 15
  • 32
  • Do you you have an unhandled exception handler (derived from IErrorHandler) in your WCF service? – stuartd May 16 '13 at 12:33
  • If you're not seeing an error in your logs, then you need to find out what it is. If you implement IErrorHandler and set it to log all errors it catches, then you should be able to find out what is causing your service to fault. – stuartd May 16 '13 at 12:59
  • as this is a ConfigurationErrorsException you need to make sure you've correctly registered the behavior extension in your config - e.g. check that you've used the correct assembly name – stuartd May 17 '13 at 13:26
  • Your type should be `Microsoft.Samples.MSMQToWCF.ErrorHandlerExtension, Microsoft.Samples.MSMQToWCF` - the assembly name is the the second parameter, not the class name. – stuartd May 17 '13 at 14:01
  • You'll also have to add a reference to the component in the serviceBehaviors section: ` ` – stuartd May 17 '13 at 14:06

0 Answers0