|
|
|
start date: Tue, 31 Jul 2007 15:47:12 -0700,
posted on: microsoft.public.dotnet.framework.interop
back
| Thread Index |
|
1
unknown
|
|
2
Johannes Passing
|
|
3
unknown
|
Question about COM & .NET Security
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
Date:Tue, 31 Jul 2007 15:47:12 -0700
Author:
|
Re: Question about COM & .NET Security
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
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://int3.de/
Date:Mon, 06 Aug 2007 19:26:20 +0200
Author:
|
Re: Question about COM & .NET Security
Thanks for the tip, I'll check it out!
Carl
Date:Mon, 06 Aug 2007 16:36:29 -0700
Author:
|
|
|