I have installed MSMQ and MSMQ AD Integration on a domain controller which also hosts an Exchange server. The whole code has been used successfully on other domain controllers (none of which hosts an Exchange server; I sincerely hope that this is not the reason!).
As required on a domain controller, I have used the following code to allow the network service account to create queues:
SecurityIdentifier sidNetworkService = new System.Security.Principal.SecurityIdentifier("S-1-5-20");
ActiveDirectoryAccessRule NewRule = new ActiveDirectoryAccessRule(sidNetworkService, ActiveDirectoryRights.CreateChild, AccessControlType.Allow, new Guid("9a0dc344-c100-11d1-bbc5-0080c76670c0"), ActiveDirectorySecurityInheritance.All);
de.ObjectSecurity.AddAccessRule(NewRule);
de.CommitChanges();
However, when trying to create/access a public queue, the following error occurs:
A workgroup installation computer does not support the operation.
As described here, I have then uninstalled MSMQ and MSMQ AD Integration, installed it again, but the error is the same.
I verified that MSMQ is installed in Domain Mode by proving that HKLM\Software\Microsoft\MSMQ\Parameters
has Workgroup
set to REG_DWORD 0x00000001 (1)
So I have had a look into eventvwr.msc
and found the following errors:
The Message Queuing service failed to join the computer's domain 'EXCH'. Error 0xc00e0025:
and
Message Queuing was unable to create the msmq (MSMQ Configuration) object in Active Directory Domain Services. Error c00e0025h:
These errors are already described here, but without an accepted solution.
So, does someone have an idea where to find the culprit?