WCF with MSMQ issue
-
I've created a prototype application which uses WCF and MSMQ to send simple "hello world" messages from a client app to a server app. I was able to get it successfully working on my machine. However, being a client/server technology, I need to get this prototype working across a network. So, I got a second PC, installed MSMQ on it and my client application. When I run the client app on this second PC, it does not work correctly. I don't get any run-time exceptions, however, the messages are not received on my server. If I go into my client PC's Computer Management console, I can see the messages in its outgoing queue. So, it appears that the problem is that my client app is not connecting to my server app. Both machines are on the same domain and can see each other in Windows Explorer. I'm able to copy files back and forth from both PCs. If I execute
MessageQueue.GetPrivateQueuesByMachine()
on my client PC, I can see my server's queues. I should note that my server's queue is private. I'm using Visual Studio 2008, .NET 3.5. My server machine is running Windows 7. My client PC is running Windows Server 2003 R2. My binding is netMsmqBinding. To create my prototype, I am using Michele Bustamante's QueuedServices example from chapter 6 of her "Learning WCF" book. You can download her example here: http://www.thatindigogirl.com/downloads/LearningWCFVS2008.zip My client side's app config is at the end of this post. If I attempt to bypass WCF and send the message to MSMQ directly...MessageQueue rmQ = new MessageQueue("FormatName:DIRECT=OS:MyComputerName\\private$\\messagingservicequeue");
rmQ.Send("Hello world");...I get the same behavior as before. The message is stuck in the client PC's outgoing queue. I'm not sure what's wrong or even where to begin debugging this issue.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<netMsmqBinding>
<binding name="netMsmq" >
<security mode="None" />
</binding>
</netMsmqBinding>
</bindings>
<client>
<endpoint address="net.msmq://MyComputerName/private/MessagingServiceQueue"
binding="netMsmqBinding" bindingConfiguration="netMsmq"
contract="WinClient.localhost.IMessagingService" name="netMsmq" />
</client>
</system.serviceModel>
</configuration> -
I've created a prototype application which uses WCF and MSMQ to send simple "hello world" messages from a client app to a server app. I was able to get it successfully working on my machine. However, being a client/server technology, I need to get this prototype working across a network. So, I got a second PC, installed MSMQ on it and my client application. When I run the client app on this second PC, it does not work correctly. I don't get any run-time exceptions, however, the messages are not received on my server. If I go into my client PC's Computer Management console, I can see the messages in its outgoing queue. So, it appears that the problem is that my client app is not connecting to my server app. Both machines are on the same domain and can see each other in Windows Explorer. I'm able to copy files back and forth from both PCs. If I execute
MessageQueue.GetPrivateQueuesByMachine()
on my client PC, I can see my server's queues. I should note that my server's queue is private. I'm using Visual Studio 2008, .NET 3.5. My server machine is running Windows 7. My client PC is running Windows Server 2003 R2. My binding is netMsmqBinding. To create my prototype, I am using Michele Bustamante's QueuedServices example from chapter 6 of her "Learning WCF" book. You can download her example here: http://www.thatindigogirl.com/downloads/LearningWCFVS2008.zip My client side's app config is at the end of this post. If I attempt to bypass WCF and send the message to MSMQ directly...MessageQueue rmQ = new MessageQueue("FormatName:DIRECT=OS:MyComputerName\\private$\\messagingservicequeue");
rmQ.Send("Hello world");...I get the same behavior as before. The message is stuck in the client PC's outgoing queue. I'm not sure what's wrong or even where to begin debugging this issue.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<netMsmqBinding>
<binding name="netMsmq" >
<security mode="None" />
</binding>
</netMsmqBinding>
</bindings>
<client>
<endpoint address="net.msmq://MyComputerName/private/MessagingServiceQueue"
binding="netMsmqBinding" bindingConfiguration="netMsmq"
contract="WinClient.localhost.IMessagingService" name="netMsmq" />
</client>
</system.serviceModel>
</configuration>Here's something interesting that I discovered. I decided to switch my client/server PCs so that the host was running on my Win2003 machine and the client was running on my Win7 machine. It worked! I was able to receive messages across the network. So it's something about Windows 7 or my computer that's causing the problem. But what could it be?