1
votes

Standard set up I think. I've followed: http://blogs.msdn.com/b/tomholl/archive/2008/07/12/msmq-wcf-and-iis-getting-them-to-play-nice-part-1.aspx mainly, but used other sources as needed.

So far here is what happens:

  1. Client sends a message
  2. I see the message in the Journal Messages for the appropriate queue
  3. Service never seems to be called. I have a ton of logging that would output logs on service called and / or errors in the service method.

I have shut down the service and the message still ends up in the Journal Messages - not sure why that is.

Queue: bretrace/bretraceservice.svc (anonymous access, with full permissions granted)

Client Web.config

<netMsmqBinding>
    <binding name="MsmqBreTrace" receiveErrorHandling="Move">
        <security mode="None" />
    </binding>
</netMsmqBinding>

<endpoint address="net.msmq://wcfserver/private/bretrace/bretraceservice.svc" binding="netMsmqBinding"
    bindingConfiguration="MsmqBreTrace" name="MsmqBreTraceService"
    contract="C.BusinessRuleController.Services.BoschProxy.Trace.IQueuingTraceContract"/>

Service Web.config

<bindings>
    <netMsmqBinding>
        <binding name="MsmqBreTraceReader" receiveErrorHandling="Move">
            <security mode="None" />
        </binding>
    </netMsmqBinding>
</bindings>
<services>
    <service name="C.BusinessRuleController.Services.QR.BreTraceService">
        <endpoint address=""
            binding="netMsmqBinding" bindingConfiguration="MsmqBreTraceReader"
            contract="C.BusinessRuleController.Services.BoschProxy.Trace.IQueuingTraceContract" />
    </service>
</services>

I have also activated system.diagnostics, and it seems to be calling the service, under activity I see:

  • "Process Action: 'http://tempuri.org/IQueuingTraceContract/LogTrace'." I'm not sure if the tempuri.org is a problem or not?
  • "Execute C.BusinessRuleController..." as another activity.

1
Have you enabled end to end tracing? technet.microsoft.com/en-us/library/cc730882.aspxtom redfern
I have enabled it - but I honestly have trouble making heads or tails of it. I have 3 events - Message came over network (event id 4) Message put into queue (event id 1), and Message Received (event id 2). I can't see where this is showing what service is receiving the messagePrescott
If you have three events per message this would normally indicate that everything is fine. Have you thought about using transactional queues?tom redfern
@hugh They are in a transactional queue. I've got all kinds of logging in the service method that should be receiving the message and nothing at all gets logged.Prescott
What about WCF tracing on the server? The only thing I can think is wrong is that you are getting some kind of serialization/formatting issue when you receive the message. Also I notice you are using netMsmqBinding. I assume therefore that your client is also WCF?tom redfern

1 Answers

0
votes

Couple of things solved this problem for me:

First, I had to set security mode='transactional' in the bindings

<netMsmqBinding>
    <binding name="MsmqBreTrace" receiveErrorHandling="Move">
        <security mode="Transactional" />
    </binding>
</netMsmqBinding>

Second, I had to installed MSMQ Active Directory Integration - I didn't have to actually enable it, but it had to be installed even when it wasn't used. This was what threw me the most, I didn't want AD Integration, so I figured I didn't need it. Turns out I was wrong.