我有一个客户端应用程序将消息放入名为 MsmqService/MsmqService.svc 的私有队列中。
在 IIS 默认网站下,我添加了带有 net.msmq 绑定的 wcf 服务。
我确保队列设置为事务性
以下是客户端应用程序和 wcf 的相关配置部分。
<system.serviceModel>
<bindings>
<netMsmqBinding>
<binding name="MsmqBindingNonTransactionalNoSecurity" exactlyOnce="false">
<security mode="None"/>
</binding>
<binding name="MsmqBindingNonTransactionalTransportSecurity" exactlyOnce="false">
<security mode="Transport"/>
</binding>
<binding name="MsmqBindingTransactionalTransportSecurity" exactlyOnce="true" receiveErrorHandling="Move">
<security mode="Transport"/>
</binding>
</netMsmqBinding>
</bindings>
<services>
<service name="MsmqService.MsmqService">
<endpoint address="net.msmq://localhost/private/MsmqService/MsmqService.svc" binding="netMsmqBinding"
bindingConfiguration="MsmqBindingTransactionalTransportSecurity" contract="MsmqContract.IMsmqContract"/>
</service>
</services>
</system.serviceModel>
我在默认网站的启用协议和 wcf 服务的启用协议下拥有 net.msmq