我有一个带有 MSMQ 绑定的 WCF 服务,它工作正常。每当任何消息进入 MSMQ 队列时。它正在处理队列并从队列中删除消息。但它没有调用操作合同,我没有得到有关消息的信息。
有什么方法可以直接调用您的操作合同还是有其他方法?我在 WAS 和 MSMQ 中托管 wcf 服务,以下是我的 web.config 设置。
<system.serviceModel>
<bindings>
<netMsmqBinding>
<binding name="WCFQNonTransactional" exactlyOnce="false">
<security mode="None"/>
</binding>
</netMsmqBinding>
</bindings>
<services>
<service behaviorConfiguration="MyWCFService.MSMQReceiverServiceBehavior" name="MyWCFService.MSMQReceiverService">
<endpoint address="http://localhost:90/MSMQReceiverService.svc"
binding="wsHttpBinding"
contract="MyWCFService.IMSMQReceiverService" name="mymsmq">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="net.msmq://localhost/private/Mywcfservice/msmqreceiverservice.svc"
binding="netMsmqBinding" bindingConfiguration="WCFQNonTransactional"
contract="MyWCFService.IMSMQReceiverService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyWCFService.MSMQReceiverServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>