Search code examples
c#msmq

C# How to check if message queue worked in domain mode programmatically


I have a requirement to send authenticated message to a message queue, signing by internal certificate. This requires the MSMQ to work in domain mode.

I have found an API for VB MSMQApplication.IsDSEnabled, but I can't find one for C#?


Solution

  • According to How to determine if MSMQ 2.0 is installed in Workgroup or Directory mode, the registry HKLM\SOFTWARE\Microsoft\MSMQ\Parameters\Workgroup can be used to verify if MSMQ is working in workgroup mode or domain mode. MSMQApplication seems a COM interface, I am not familiar to COM, so I check the registery as a temporary solution.