Home All Groups Group Topic Archive Search About

Problems with AzMan interop and CLR 2

Author
17 Mar 2006 4:03 PM
John
I am moving an application over to 2005 and CLR 2 which so far has had
minimum trouble. Now I have hit a real road block. I use Authorization
Manager with the enterprise lib security block.

Part of that requires that the AzMan managed wrapper
"Microsoft.Interop.Security.AzRoles.dll" which I have had zero issues
with under 1.1

Now, when I run the application, as soon as a call is made to AzMan I
get the following exception:

System.Security.SecurityException: Retrieving the COM class factory for
component with CLSID {B2BCFF59-A757-4B0B-A1BC-EA69981DA69E} failed due
to the following error: 80040154.

At the bottom of the stack trace it mentioned the zone was "MyComputer".
I tried going into the 2.0 configuration and adding this interop
assembly into the code policy section so that it would be trusted (I
don't really know thats the problem but saw some similar things on the
web), but as it has not been strongly named it would not allow me to do
that.

I am off to read about the security changes that were made in 2.0 that
might affect hooking into an interop assembly like this, but if anyone
is using authorization manager with CLR 2.0 I would appreciate knowing,
or any information you feel might assist me would be most appreciated.

John Parrish

Author
17 Mar 2006 6:27 PM
John
I am replying for historical purposes since I had a hard time finding
any information regarding the problem I ran into.

Solution:

Apparently in 2.0 the interop asseblies require full trust, and
subsequently the 2.0 GAC now grants full trust to any assembly that is
added to it.

Once I added the AzMan interop assembly into the GAC rather than in the
bin folder I no longer got the security exception.
Author
17 Mar 2006 9:07 PM
Dominick Baier [DevelopMentor]
well - also in 1.x AzMan needs fulltrust - COM interop always requires full
trust.

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> I am replying for historical purposes since I had a hard time finding
> any information regarding the problem I ran into.
>
> Solution:
>
> Apparently in 2.0 the interop asseblies require full trust, and
> subsequently the 2.0 GAC now grants full trust to any assembly that is
> added to it.
>
> Once I added the AzMan interop assembly into the GAC rather than in
> the bin folder I no longer got the security exception.
>