S
shikha meena
Hi,
I have written the following code to send message using MSMQ from the
device to PC.
Private Sub SendMessageToQueue(ByVal Path As String)
' Create a new order and set values.
myQ = New MessageQueue(Path)
Dim sendOrder As New MSG
ID += 1
Label4.Text = ID
sendOrder.orderID = Label4.Text
Label5.Text = DateTime.Now
sendOrder.orderTime = Label5.Text
sendOrder.orderBody = TextBox1.Text
Try
myQ.Send(sendOrder)
myQ.Close()
MsgBox("Message Sent")
Catch ex As Exception
MsgBox("SendMessage: " & ex.Message)
End Try
End Sub
On the line "myQ.Send(sendOrder)" following exception is thrown
"The queue does not exist
or you do not have sufficient permissions to perform the operation"
at MQCacheableInfo.get_WriteHandle()
at System.Messaging.MessageQueue.StaleSafeSendMessage()
at System.Messaging.MessageQueue.SendInternal()
at System.Messaging.MessageQueue.Send()
at MSMQcf.Form1.SendMessageToQueue()
at MSMQcf.Form1.Button3_Click()
Any suggestion to resolve this problem will be a great help.
Thanks
Shikha
I have written the following code to send message using MSMQ from the
device to PC.
Private Sub SendMessageToQueue(ByVal Path As String)
' Create a new order and set values.
myQ = New MessageQueue(Path)
Dim sendOrder As New MSG
ID += 1
Label4.Text = ID
sendOrder.orderID = Label4.Text
Label5.Text = DateTime.Now
sendOrder.orderTime = Label5.Text
sendOrder.orderBody = TextBox1.Text
Try
myQ.Send(sendOrder)
myQ.Close()
MsgBox("Message Sent")
Catch ex As Exception
MsgBox("SendMessage: " & ex.Message)
End Try
End Sub
On the line "myQ.Send(sendOrder)" following exception is thrown
"The queue does not exist
or you do not have sufficient permissions to perform the operation"
at MQCacheableInfo.get_WriteHandle()
at System.Messaging.MessageQueue.StaleSafeSendMessage()
at System.Messaging.MessageQueue.SendInternal()
at System.Messaging.MessageQueue.Send()
at MSMQcf.Form1.SendMessageToQueue()
at MSMQcf.Form1.Button3_Click()
Any suggestion to resolve this problem will be a great help.
Thanks
Shikha