0

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>
4

1 回答 1

0

您使用排队的事实意味着从概念上讲您的客户端和服务器是断开连接的。如果您想将异常报告回客户端,您可能需要重新访问您的架构以确保您确实想要使用队列。

如果您决定走 MSMQ 路线,则 Stack Overflow 上的这个问题讨论了可用于处理异常的选项:How do I handle message failure in MSMQ bindings for WCF

对于 MSMQ 上的请求-回复类型行为,有一些高级解决方法,Lowy 出色的“Programming WCF Services book”中给出了一种解决方法。

于 2013-05-18T21:58:52.923 回答