Re: Web Part and COM Interop

From: Bil Simser [MVP] (bsimser_at_shaw.ca)
Date: 08/31/04


Date: Tue, 31 Aug 2004 17:19:07 -0600


"Eric Johnson" <ej@ejinnovations.com> wrote in message
news:XR1Zc.491414$6p.94863@news.easynews.com...
> I'm writing a Web Part which needs to use COM Interop for its
> functionality, but having a security problem when I try to use anything in
> the Interop assembly. The exception thrown is
> System.Security.Permissions.SecurityPermission.
>
> I made a SafeControl entry in the web.config file for the interop assembly
> but that didn't help. Nor did using the .NET Framework Wizard to fully
> trust this assembly.
>
> What else needs to be changed in order for this to work? Is there a way
> to find out which resource is being accessed by the interop assembly?

Eric,

Any .NET managed assembly needs full trust to use COM interop. Basically
your assembly needs god access.

-Bil



Relevant Pages

  • Re: Code Access Security
    ... I notice that you stated that you assigned the "Everything" permission set. ... Note that this is *not* the same as "Full Trust". ... > at the exception trace and see what is generating the SecurityException ... The interop layer is contained in mscorlib ...
    (microsoft.public.dotnet.framework)
  • Re: Problems with AzMan interop and CLR 2
    ... well - also in 1.x AzMan needs fulltrust - COM interop always requires full trust. ... subsequently the 2.0 GAC now grants full trust to any assembly that is ...
    (microsoft.public.dotnet.security)
  • Re: Web Part and COM Interop
    ... >> in the Interop assembly. ... Nor did using the .NET Framework Wizard ... >> to fully trust this assembly. ... > Any .NET managed assembly needs full trust to use COM interop. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: AzMan Still the way to go?
    ... A couple of downsides about AzMan. ... site will required full trust. ... propagated very poorly from the interop layer or wherever. ...
    (microsoft.public.dotnet.framework.aspnet.security)