tags:

views:

1434

answers:

3

I can find all sorts of stuff on how to program for DCOM, but practically nothing on how to set/check the security programmatically.

I'm not trying to recreate dcomcnfg, but if I knew how to reproduce all the functionality of dcomcnfg in C# (preferred, or VB.net) then my goal is in site.

I can't seem to be able to find any good resource on this, no open source api's or even quick examples of how to do each step. Even here DCOM or dcomcnfg returns few results and none really about how to set/verify/list security.

If anybody has some pointers to an open api or some examples I would appreciate it.

A: 

I couldn't find any .NET way of doing this - you can use the MS command line utility DCOMPerm which is part of the SDK or download from here (or here from this post)

(I do not use any of the above links for the dcomperm.exe, I use a file compiled for me by a co-worker...)

Dror
+1  A: 

This information is stored in HKCR\AppID\{Your-AppID}\LaunchPermission and AccessPermission. These are REG_BINARY values containing serialized security descriptors. No idea whether there's anything providing convenient access to those from .NET...

More info on MSDN.

Arnout
A: 

Hi,

I do have exactly the same problem. So if you found a solution, it would be very nice, if you could post it.

thanks in advance