Read MSDTC configuration
-
03-07-2019 - |
Question
Does anyone have any ideas on how to read the MSDTC configuration on the current machine? I am specifically trying to check that the user has performed the following steps:
Open Component Management (Start > All Programs > Administrative Tools > Component Services)
Double-click on Component Services, then expand Computers. Right-click on My Computer and select Properties
On the MSDTC tab, click the Security Configuration button, and configure the properties as follows:
Network DTC Access: Checked
Allow Remote Clients: Checked
Allow Inbound: Checked
Allow Outbound: Checked
Incoming Caller Authentication Required: Selected
It's part of a small component I need to write to validate end-user configuration. I don't think I would attempt to fix it if it were wrong: just point the user at the help file - so only read only is needed.
Solution
I'm not sure if you can do this programmatically from any API, or WMI. At least you can check the registry information at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\Security
OTHER TIPS
You can use the COM+ Administration classes/interfaces to do this. It will require COM interop though on your part.
The reference is located at:
http://msdn.microsoft.com/en-us/library/ms681189(VS.85).aspx