[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Question about COM & .NET Security

carl_bevil

7/31/2007 10:47:00 PM

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

2 Answers

Johannes Passing

8/6/2007 5:26:00 PM

0

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/ms6...

carl_bevil@yahoo.com wrote:
> 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
>


--
Johannes Passing - http:...

carl_bevil

8/6/2007 11:36:00 PM

0

Thanks for the tip, I'll check it out!

Carl