Why can't I connect to a remote private queue in msmq?

I asked this question on the MSDN forum, John Bromwell helped me a lot, but I could not solve my problem, and now I am running in a circle (again). Maybe someone here can help me.

I have a remote private queue, a manufacturing application, and a consumer application. I am using Windows Server 2008 with MSMQ.

I can send a message using my producer application, but I cannot read it with the help of my consumer. Here is my consumer code

MessageQueue rmQ = new MessageQueue("FormatName:Direct=OS:<hostname>\\private$\\<queuename>"); System.Messaging.Message msg = rmQ.Receive(); 

I get an exception in the second line, the exception is null without any information other than the stack trace

System.Messaging.MessageQueueException (0x80004005) in System.Messaging.MessageQueue.MQCacheableInfo.get_ReadHandle () in System.Messaging.MessageQueue.StaleSafeReceiveMessage (UInt32 timeout, Int3 2, Properties MQPROlable Received Received Received Received, Received, Received, Received, Received, Received, Error , transaction IntPtr) in System.Messaging.MessageQueue.ReceiveCurrent (TimeSpan timeout, Int32 actio n, cursor, MessagePropertyFilter filter, MessageQueueTransaction in ternalTransaction, MessageQueueTransactionType transactionType) in System.Messaging.MessgramQue. user. Main (String [] args) in C: \ Users \ usr \ Documents \ Visua l Studio 2010 \ Projects \ loadQueueTest \ consumer \ Program.cs: line 20

I read a lot, so I already did something:

  • I set up anonymous login for full access to the queue
  • I set my domain user as administrator on the server
  • Opened ports for MSMQ and RPC
  • Firewall disabled

I also used rpcping and portqry to run some diagnostic tests, I am not an expert, but it looks fine.

Does anyone know what I am missing?

Thanks Oscar

+4
source share

Source: https://habr.com/ru/post/1382775/


All Articles