H
hamish
Hi,
Hope this is the correct place to post this query. What I am doing i think
is pretty simple. I have a web service that has a function that will insert a
message into a Queue, so that it can be processed by one of our backend
applications.
The code looks like this:
Dim oQueue As MessageQueue
If Not MessageQueue.Exists(".\myservice") Then
MessageQueue.Create(".\myservice", False)
End If
oQueue = New MessageQueue(".\myservice")
This all seems correct, except that the following happens. Whenever the
messagequeue.exists call is made, it brings back false, so it attempts to
create the message queue every time, which of course fails because the
message queue already exists. On the first run, it creates the queue (and the
queue can be seen in MMC), but it does not instantiate the oQueue object. It
fails with the Queue is not registered in DS error (or something similar).
The second time it runs, it obviously fails on the MessageQueue create call,
because the queue already exists.
I have searched and tried a few different solutions. Some include including
the machine name in the path, others were to add
FormatNameIRECT=OS:.\MyService but all to no avail
Please help
Hope this is the correct place to post this query. What I am doing i think
is pretty simple. I have a web service that has a function that will insert a
message into a Queue, so that it can be processed by one of our backend
applications.
The code looks like this:
Dim oQueue As MessageQueue
If Not MessageQueue.Exists(".\myservice") Then
MessageQueue.Create(".\myservice", False)
End If
oQueue = New MessageQueue(".\myservice")
This all seems correct, except that the following happens. Whenever the
messagequeue.exists call is made, it brings back false, so it attempts to
create the message queue every time, which of course fails because the
message queue already exists. On the first run, it creates the queue (and the
queue can be seen in MMC), but it does not instantiate the oQueue object. It
fails with the Queue is not registered in DS error (or something similar).
The second time it runs, it obviously fails on the MessageQueue create call,
because the queue already exists.
I have searched and tried a few different solutions. Some include including
the machine name in the path, others were to add
FormatNameIRECT=OS:.\MyService but all to no avail
Please help