WCF service was never notified when posting new message to private queue in workgroup mode

I am using WCF (C #) to send / receive messages from a private MSMQ queue under Windows Server 2003 in workgroup mode.

WCF / Service Client WCF and MSMQ are on the same machine.

There's one client that sends a message to a private queue works great. There's one service that receives a message from the same private queue, but the service never seems to be called by MSMQ. (no errors occur)

Messages are queued, but nothing is pulled out. On the other computer (domain mode, not workgroup mode) the messages were sent and received perfectly.

What's wrong with workgroup mode, which makes MSMQ never call my service?

After that, I write a C # test always on the same computer, but this time I created a MessageQueue and subscribed to the ReceiveCompleted event like this:

MessageQueue MQueue = new MessageQueue(".\\private$\\nameofmyqueue");
MQueue.MessageReadPropertyFilter.SetAll();
MQueue.ReceiveCompleted += MessageEventHandler;
Message Msg = MQueue.Receive();

      

And I get events from the MSMQ queue when there is a new message.

I think my service configuration (WFC config) or my namespace reservation is having problems.

+1


source to share


1 answer


I found where my problem was. I was actually using a transaction calling a SQL Server 2005 procedure.

To use transactional binding with SQL 2005, procedure execution is bound to the transaction scope.

If an exception was thrown and not found, DTC was used to rollback the process. My problem is the DTC / remote client connection was not activated on my server.



So, either you have to activate the DTC / remote client connection or don't use the transaction scope.

If you want to use DTC and remote client connection, the remote client connection must be activated before , as activating DTC and remote client connection will cause the server to restart .

0


source







All Articles