0
votes

I am having WCF subscriber for MSMQ which is installed as windows service.I have attached a IErrorhandler as well.So i needed to make it OneWay= false in service contract.Now when I am starting the windows service I am getting bellow errro:-

Service cannot be started. System.InvalidOperationException: Contract requires TwoWay (either request-reply or duplex), but Binding 'MsmqIntegrationBinding' doesn't support it or isn't configured properly to support it. at System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result)

I am new to WCF.. please help me.how to configure MsmqIntegrationBinding for duplex.

my app.config section is below:-

 <msmqIntegrationBinding>
    <binding name="OrderProcessorBinding" maxRetryCycles="0" receiveErrorHandling="Move"
      receiveRetryCount="3" retryCycleDelay="00:00:59">
      <security mode="None" />
    </binding>
  </msmqIntegrationBinding>
1

1 Answers

0
votes

The fact that you are using queueing means that conceptually your client and server are disconnected. If you want to report exceptions back to the client you may want to re-visit your architecture to make sure you really want to use queueing.

This question on Stack Overflow discusses the options available for dealing with exceptions if you do decide to go down the MSMQ route: How do I handle message failure in MSMQ bindings for WCF

There are advanced workarounds for a request-reply type behaviour over MSMQ, one is given in Lowy's excellent "Programming WCF Services book".