我有MSMQ的WCF订户,这是作为windows服务安装的。我附加了一个IErrorhandler作为well.So,当我启动windows服务时,我得到下面的错误:-
无法启动服务。System.InvalidOperationException:协定需要TwoWay (请求-回复或双工),但绑定“”MsmqIntegrationBinding“”不支持它或未正确配置为支持它。“”在System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff,ServiceHostBase serviceHost,Uri listenUri,ListenUriMode listenUriMode,Boolean supportContextSession,IChannelListener& result)
我是WCF的新手。请帮助me.how为双工配置MsmqIntegrationBinding。
我的app.config部分如下:
<msmqIntegrationBinding>
<binding name="OrderProcessorBinding" maxRetryCycles="0" receiveErrorHandling="Move"
receiveRetryCount="3" retryCycleDelay="00:00:59">
<security mode="None" />
</binding>
</msmqIntegrationBinding>发布于 2013-05-19 05:58:53
使用队列的事实意味着,从概念上讲,您的客户端和服务器是断开连接的。如果您想要将异常报告回客户端,您可能想要重新访问您的体系结构,以确保您确实想要使用队列。
这个关于堆栈溢出的问题讨论了如果您决定沿着MSMQ路线走下去,可用于处理异常的选项:How do I handle message failure in MSMQ bindings for WCF
对于MSMQ上的请求-回复类型的行为,有一些高级的变通方法,其中一个在Lowy的优秀的"Programming WCF Services book“中给出。
https://stackoverflow.com/questions/16621747
复制相似问题