2013-05-18 22 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服務書」中。