Hello,
On Windows 7 with .NET 4.0 I have the following code in a
VB.NET Windows Form:
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
Try
Dim q As New MessageQueue(".\private$\b")
q.Send("a")
MsgBox("ok")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
A System.Messaging.MessageQueueException is thrown on the line:
q.Send("a")
with the message:
The queue does not exist or you do not have sufficient permissions to perform the operation.
When I create this queue in Control Panel/Administrative Tools/Computer Management/Services and Applications/Message Queueing/Private Queues, then this code works correctly.
Is it not possible to create a message queue from
VB.NET?
Do I have to create them manually, before they are used in
VB.NET?