Security exception when calling managed dll that calls unmanaged COM object

From: Caleb Cha (anonymous_at_discussions.microsoft.com)
Date: 01/29/04


Date: Thu, 29 Jan 2004 14:51:11 -0800

I have a bit of an odd scenario.
I have a c# exe that is dynamically loading a C# class library on startup. The class library references a COM object written in unmanaged c++.
>From whe exe when I call a function in the c# class library and it in turn calls a function in the COM object I get a security exception.
"An unhandled exception of type 'System.Security.SecurityException' occurred in mscorlib.dll
Additional information: System.Security.Permissions.SecurityPermission"

I tried doing a [assembly:AllowPartiallyTrustedCallersAttribute] in the my c# class library but it didn't help.

Thank in advance for any help
Caleb



Relevant Pages

  • RE: wmon16.exe
    ... I forgot to mention - if you disinfect manually (kill the process, ... remove the startup key), there's one more step - delete the EXE ... You need to repeat for each dodgy EXE on the system. ... > you can compare the process lists if you need to. ...
    (Incidents)
  • Re: Automatic running of exe while system restarts
    ... entry in the Run section in the registry. ... shortcut into StartUp or to modify the registry, ... Iam now facing a problem.i want to make an exe to run automatically ...
    (microsoft.public.vb.general.discussion)
  • Re: User Startup with Full Screen CMD.exe
    ... the .bat file and the .exe in full screen. ... I thought it maybe a startup issue, ... The default shell is Explorer.exe; you could try and specify a different ...
    (microsoft.public.win2000.setup)
  • Re: User Startup with Full Screen CMD.exe
    ... the .bat file and the .exe in full screen. ... I thought it maybe a startup issue, ... specify a different shell, e.g. cmd.exe. ...
    (microsoft.public.win2000.setup)
  • Re: Win2K3 Server Group Policy issue
    ... You are running a startup exe in order to show system info on the desktop, ... > I know that the .exe with its config file and parameters are correct b/c I ...
    (microsoft.public.windows.group_policy)