.NET Framework Developer Center > .NET Development Forums > .NET Framework Networking and Communication > Receive a message from a private or public remote Message Queue
Ask a questionAsk a question
 

QuestionReceive a message from a private or public remote Message Queue

  • Monday, November 02, 2009 10:52 AMBeneventi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Hello, I have a Domain Controller on which I've created two message queues, one public and one private. I need to read messages from these queues from a machine that is not part of the domain.

    MessageQueue queue = new MessageQueue(@"mymachine\private$\myqueue");
    
    Message message = queue.Receive();
    
    
    I tried with this code but I get an Exception that tells me the queue path is not valid. If I run this code from the domain controller everything works.

    I've also tried with

    MessageQueue queue = new MessageQueue(@"FormatName:Direct=OS:mymachine\private$\myqueue");
    
    This time I get an "Access Denied to the Messaging System" exception.

    Can anyone help me?

    Best regards.

    Alessandro