开发者

WCF Msmq with "Message" security, can't receive messages from the queue

I have a WCF router sending messages to a private msmq using netMsmqBinding. I have another WCF service listening for messages on that queue. When the security mode is set to "None" i am able to send messages to the queue and also receive messages from the queue without any issues. When i try and use the "Message" security mode, i am able to send messages to the queue, but i can not receive the messages from the queue, my receive service does not get called. Any ideas what would be causing this issue? Here is my config file for the service listening for messages...

<configuration>
   <system.serviceModel>
      <services>
         <service name="MyService" behaviorConfiguration="ServiceBehavior">
            <host>
               <baseAddresses>
                  <add baseAddress="http://localhost:8000/MyService" />
               </baseAddresses>
            </host>
            <endpoint name="NET.M开发者_运维问答SMQ_1" 
                      address="net.msmq://localhost/private/TestQueue1" 
                      binding="netMsmqBinding" bindingConfiguration="Binding" 
                      contract="MyContract" />
         </service>
      </services>
      <behaviors>
         <serviceBehaviors>
            <behavior name="ServiceBehavior">
                <serviceMetadata httpGetEnabled="True" />
            </behavior>
         </serviceBehaviors>
      </behaviors>
      <bindings>
         <netMsmqBinding>
             <binding name="Binding">
                 <security mode="Message"/>
             </binding>
         </netMsmqBinding>
      </bindings>
   </system.serviceModel>
</configuration>


Getting MSMQ and WCF to work properly isn't always easy - but it does work! :-)

Check out this three-part blog post series by Tom Hollander on the topic - I got my stuff up and running thanks to this:

  • MSMQ, WCF and IIS: Getting them to play nice (Part 1)
  • MSMQ, WCF and IIS: Getting them to play nice (Part 2)
  • MSMQ, WCF and IIS: Getting them to play nice (Part 3)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜