MSMQ private queue issue between two domains
My local machine is on domain A, my simple console application tries to put a message onto a private queue of a remote machine, which is on domain B. In the outgoing queues the status shows connected but the message does not seem to go. On the receiving 开发者_如何学Cside, the private queue does not seem to be receiving the message. The permissions for the private queue is set to full control for Everyone,Anonymous log in and System.
You can try to Impersonate to the user for domainb first (see http://blogs.msdn.com/b/joncole/archive/2009/09/21/impersonation-code-in-c.aspx)
and then make the call(s) to the remote queue
Not 100% sure if that will work though.
It's to do with NAT, if the receiver machine is behind a NAT, you can not send MQ to it. The work around is to specify a public IP on the receiver machine and use direct TCP address format which is 'FormatName:DIRECT=TCP:{remoteIP}\private$\{QueueName}'
Forexample:
FormatName:DIRECT=TCP:200.201.202.203\private$\mqReceiverQueue
精彩评论