Using MSMQ on a workgroup?


G

Guest

I have a service built that is trying to read messages from a private que.
When this tries to happen I get this error....

A workgroup installation computer does not support the operation

From what I read I need to have my system setup on a domain, is this
correct? For my dev work I'm not going to have that envirorment available and
everything is tested on one laptop. Is there anything I can do? Thank you
 
Ad

Advertisements

D

David Browne

Webbee said:
I have a service built that is trying to read messages from a private que.
When this tries to happen I get this error....

A workgroup installation computer does not support the operation

From what I read I need to have my system setup on a domain, is this
correct? For my dev work I'm not going to have that envirorment available
and
everything is tested on one laptop. Is there anything I can do? Thank you

You do not need to enlist your MSMQ in a domain. You can read and write to
local and remote private queues with workgroup instals of MSMQ.

What OS are you using?
You need to use windows 2000, XP or 2003 server.

What MSMQ library?
You should be using the managed System.Messaging namespace.

How are you accessing your queues?
Access to remote private queues requires using a queue FormatName instead of
a PathName.

EG:
FormatName:direct=os:somehost\private$\somequeue

David
 
G

Guest

David Browne said:
You do not need to enlist your MSMQ in a domain. You can read and write to
local and remote private queues with workgroup instals of MSMQ.

What OS are you using?
You need to use windows 2000, XP or 2003 server.

What MSMQ library?
You should be using the managed System.Messaging namespace.

How are you accessing your queues?
Access to remote private queues requires using a queue FormatName instead of
a PathName.

EG:
FormatName:direct=os:somehost\private$\somequeue

David

I'm using XP and the System.Messaging namespace. The thing is I wrote 2
testing apps to learn on and they work fine. One will send messages in and
one will read them back to me. Now once I put this same code into a service
it stopped working? Here is the code...

Try
Dim doc As XmlDocument
doc = New XmlDocument

Dim element As XmlElement

Dim queue As MessageQueue
queue = New MessageQueue

Dim mess As Message
mess = New Message

queue.Path = (".\" & MSMQ)
queue.Formatter = New XmlMessageFormatter(New String()
{"System.String"})

For Each mess In queue
queue.Peek()
doc.LoadXml(CType(mess.Body, String))
element = doc.DocumentElement


LogEntry(element.SelectSingleNode("/GMImport/NewContact/RecID").InnerText,
EventLogEntryType.Information, enLogMode.Medium_Importance)
Next

Catch ex As Exception
LogEntry(ex.Message, EventLogEntryType.Error,
enLogMode.High_Importance)
End Try
 
G

Guest

Webbee said:
I'm using XP and the System.Messaging namespace. The thing is I wrote 2
testing apps to learn on and they work fine. One will send messages in and
one will read them back to me. Now once I put this same code into a service
it stopped working? Here is the code...

Try
Dim doc As XmlDocument
doc = New XmlDocument

Dim element As XmlElement

Dim queue As MessageQueue
queue = New MessageQueue

Dim mess As Message
mess = New Message

queue.Path = (".\" & MSMQ)
queue.Formatter = New XmlMessageFormatter(New String()
{"System.String"})

For Each mess In queue
queue.Peek()
doc.LoadXml(CType(mess.Body, String))
element = doc.DocumentElement


LogEntry(element.SelectSingleNode("/GMImport/NewContact/RecID").InnerText,
EventLogEntryType.Information, enLogMode.Medium_Importance)
Next

Catch ex As Exception
LogEntry(ex.Message, EventLogEntryType.Error,
enLogMode.High_Importance)
End Try

Also from what I have read I don't think I can use private format names when
in workgroup mode.
 
D

David Browne

Webbee said:
Also from what I have read I don't think I can use private format names
when
in workgroup mode.

No. In workgroup mode you MUST use format names to access remote private
queues. Also Queues have owners and ACL's just like files and folders.
Check the queue's permissions using Computer Management. Change the queue's
owner to the .\Administrators group, and make sure your service is running
under an account with the appropriate privileges.

David
 
G

Guest

No luck. First, when I create a que in workgroup mode I do not get a GUID for
it. The GUID is all 0's. But not only that I can not even create a new que in
workgroup mode via a service. All these things work just fine on the same
machine running from a standard windows app but once I ask the service to do
the same thing I get jammed. I created a user called MSMQ and added the
Administrators group to it. Then set the user as the one my service will use
to log in. Still no luck. I just can't understand why running in workgroup
mode would make this not work?
 
Ad

Advertisements

D

David Browne

Webbee said:
No luck. First, when I create a que in workgroup mode I do not get a GUID
for
it. The GUID is all 0's. But not only that I can not even create a new que
in
workgroup mode via a service. All these things work just fine on the same
machine running from a standard windows app but once I ask the service to
do
the same thing I get jammed. I created a user called MSMQ and added the
Administrators group to it. Then set the user as the one my service will
use
to log in. Still no luck. I just can't understand why running in workgroup
mode would make this not work?

Hold on. The _only_ difference between running in a console app and running
as a service is permissions. If it works for you in a desktop app, then
configure the service to run as _you_ and test. Once that's working, you
can start to isolate the permissions and memberships required for the
service account.

David
 
G

Guest

David Browne said:
Hold on. The _only_ difference between running in a console app and running
as a service is permissions. If it works for you in a desktop app, then
configure the service to run as _you_ and test. Once that's working, you
can start to isolate the permissions and memberships required for the
service account.

David
I thought that would do it but still no luck. I keep getting that same
error. Are you sure you can use MSMQ3 in work group mode via a service? I
just can't get the thing to work for me. I have found little info on the web
so far about this particular situation so I'm not sure what to try next. I
thank you for helping me so far.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top