Click here to Skip to main content
15,072,051 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..

I got this error when I m trying to use microsoft message queue control.

The error like this
"The queue does not exist or you do not have sufficient permissions to perform the operation."


And the code is as follows.
C#
private void btnsend_Click(object sender, EventArgs e)
{
      Payment payment;
      payment.Payor = textBox1.Text;
      payment.Payee = textBox2.Text;
      payment.Amount =Convert.ToInt32 ( textBox3.Text);
      payment.DueDate = textBox4.Text;
      System.Messaging.Message msg = new System.Messaging.Message();
      msg.Body = payment;
      MessageQueue myque = new MessageQueue(".\\private$\\billpay");
      myque.Send(msg);
}


Please give me solution.
Thanks in advance.
Posted
v2
Comments
   
Have you tried any solutions suggested by Google ?

1 solution

The clue is in the error message...
Check that the queue actually exists http://technet.microsoft.com/en-gb/library/bb684791.aspx[^]
The name of the queue (.\\private$\\ would suggest that it's not a public queue (!) so it must be configured correctly to send messages. Note that default permissions changed with MSMQ 4.0

Here's a link to the full docs http://technet.microsoft.com/en-us/library/jj667988.aspx[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900