2013-05-18 23 views
0

我有WCF用户为MSMQ安装为Windows服务。我也附加了一个IErrorhandler以及所以我需要使它OneWay =虚假服务合同。现在,当我启动Windows服务时,我正在冒出错误: -获得合同要求双向(要求回复或双工)错误

服务无法启动。 System.InvalidOperationException:合同需要TwoWay(请求回复或双工),但Binding'MsmqIntegrationBinding'不支持它或未正确配置以支持它。 在System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo东西,ServiceHostBase ServiceHost的,开放的listenUri,ListenUriMode listenUriMode,布尔supportContextSession,IChannelListener &结果)

我是新来的WCF .. 请帮助me.how配置MsmqIntegrationBinding for duplex。

我的app.config部分低于: -

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

回答

0

您正在使用的排队,这意味着概念上的客户端和服务器断开连接。如果您想要将异常报告给客户端,您可能需要重新访问您的架构以确保您真的想使用排队。

堆栈溢出这个问题讨论的可用选项为处理异常,如果你决定走下来的MSMQ路线:How do I handle message failure in MSMQ bindings for WCF

有超过MSMQ的请求 - 应答类型的行为先进的解决方法,给出一个在Lowy出色的“编程WCF服务书”中。