Forum guidelines
AuthorQuestion
MSMQ Can't Receive from Remote Queue
Posted on: 24 Feb 2009

Hi Guys,

 

I'm new to the forum and I really need your help!!!

I'm stuck with a little application that I was writing to send and receive messages from my windows mobile 6.1 phone to my desktop computer....

I have been successfull to send messages from the phone to a private remote queue on my desktop (this is using wifi connection) but I can't receive it the message from the same queue!!!!

I get an error saying I don't have privileges to read the Queue... but I have set in the security tab of the Queue Full Control to ANONYMOUS USER!!!

So why it doens't work??? Please help!!!

This is the code that I'm using at the moment:

 

private void SendToPrivateQueueDetails()

{

//Machine Name

string destination = "pippo";

MessageQueue orderQueue = new MessageQueue(String.Format(System.Globalization.CultureInfo.InvariantCulture,@"FORMATNAME:DIRECT=OS:{0}\private$\myqueue", destination));

orderQueue.Formatter = new XmlMessageFormatter(new Type[] { typeof(String) });

try

{

//Sending the Message Works

orderQueue.Send(txtSendMsg.Text, String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", "pippo-label"));

txtSendMsg.Text = "";

if (orderQueue.CanRead)

{

MessageBox.Show("You CAN REad");

}

else

//It Always enters here!!!

MessageBox.Show("You CANNOT READ!!!");

if (orderQueue.CanWrite)

{

MessageBox.Show("You CAN WRITE");

}

else

MessageBox.Show("You CANNOT WRITE!!!");

//This return the ERROR!

Message messageReceived = orderQueue.Receive(new TimeSpan(0, 0, 10));

messageReceived.Formatter = new XmlMessageFormatter(new Type[] { typeof(String) });

lblReceiveMsg.Text = (string)messageReceived.Body;

//

}

catch (Exception err)

{

MessageBox.Show(err.Message);

}

}


Yep!
AuthorReply
John Breakwell
  • 0
  • 0
accepted
Re: MSMQ Can't Receive from Remote Queue
Posted on: 25 Feb 2009   Accepted Answer

I knew that problem sounded familiar...

Digging in my archives, I found a link to an old (2000) technical article talking about Windows CE 3.0:

Microsoft Windows CE 3.0 Message Queuing Service

Windows CE-based clients do not support:

  • Encryption
  • Authentication
  • MQMail
  • Reading from remote queues
  • Direct format queue names
  • Directory-service interface for public queues

Looking for something newer,

Platform Builder for Microsoft Windows CE 5.0
MQReceiveMessage

Messages cannot be read from a queue that resides on a computer without a direct connection. Opening a queue with receive or peek access requires a direct connection to the computer where the queue resides.

I'm assuming this means you need something like a synch cable for a direct connection?

So it looks like you have been told correct - Remote Reads are not supported.

Cheers
John Breakwell (MSFT)


Re: MSMQ Can't Receive from Remote Queue
Posted on: 25 Feb 2009  

Hi Taddeo,

Could you please explain what O/S is on the desktop machine? Windows 2003 and above are not wide open for remotely receiving messages.

You may need to add "NewRemoteReadServerAllowNoneSecurityClient" to the registry
(http://blogs.msdn.com/johnbreakwell/archive/2007/01/15/msmq-3-0-too-secure-for-you.aspx)

or open up RPC ports in the firewall
(http://blogs.msdn.com/johnbreakwell/archive/2008/07/10/getting-msmq-messages-out-of-windows-server-2008.aspx).


Cheers
John Breakwell (MSFT)


Re: MSMQ Can't Receive from Remote Queue
Posted on: 25 Feb 2009  

Hi John,

Thanks for your reply, my test machine is a Win XP Pro SP3 and I did already opened the ports and added the key on the registry but I didn't work.... :(

I've posted my question in another forum and the answer has been that what I am trying to do is not possible? and I can't receive a message on a remote queue with my mobile but I can only send messages...

Is that true?

Many Thanks Again!


Taddeo


Yep!
Re: MSMQ Can't Receive from Remote Queue
Posted on: 25 Feb 2009  

That's Great!

Thanks for having looked into it!

Cheers


Yep!
Employers - Post Free Jobs

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.