all groups > dotnet interop > july 2007 >
You're in the

dotnet interop

group:

Question about COM & .NET Security


Question about COM & .NET Security carl_bevil NO[at]SPAM yahoo.com
7/31/2007 3:47:12 PM
dotnet interop:
I am developing a .NET serviced component using EnterpriseServices (in
C#). It interacts with some COM objects, and implements some
interfaces defined in COM code (C++).

I am adding role-based security to the .NET serviced component. What
I'd like to do is restrict access at the interface level. If the
interfaces were defined in .NET, all I'd have to do is add an
appropriate SecurityRole attribute to them. But it's defined in COM;
I've use tlbimp to create in interop assembly.

Is there any way to define a security role to an interface that has
been imported from COM? I know I can go to the Component Services
tool and do it through the COM+ GUI, but every time I build and
register the component the settings are cleared and I have to reset
them by hand.

Thanks!

Carl
Re: Question about COM & .NET Security carl_bevil NO[at]SPAM yahoo.com
8/6/2007 4:36:29 PM
Thanks for the tip, I'll check it out!

Carl
Re: Question about COM & .NET Security Johannes Passing
8/6/2007 7:26:20 PM
You can use the COM+ Administration Interfaces [1] to automate the
process of assigning roles - a little script should thus do the trick.

--Johannes

[1] http://msdn2.microsoft.com/en-us/library/ms678933.aspx

[quoted text, click to view]


--
AddThis Social Bookmark Button