Re: Security Exception after splitting application in different assemblies

From: Fernando Vicaria [MSFT] (fvicaria_at_online.microsoft.com)
Date: 06/15/04

  • Next message: Fernando Vicaria [MSFT]: "Re: FileIOPermission"
    Date: Tue, 15 Jun 2004 09:05:30 -0700
    
    

    Did you sign any of the 3 assemblies?

    "Sven Kuenzler" <svenk@despammed.com> wrote in message
    news:OXGtHuYUEHA.732@TK2MSFTNGP10.phx.gbl...
    >I have an application that works fine when I build it in one monolithic
    >executable assembly. Now I wanted to factor out my NUnit tests. So I split
    >the application into a "business logic" dll, a unit test dll and the
    >executable merely containing the GUI.
    >
    > In this configuration, however, I get a couple of SecurityExceptions
    > complaining that various permissions (like RegistryPermission or
    > UIPermission) are not granted to my application. When accessing the code
    > via the unit test dll though, everything appears to be running fine. I do
    > not test the UI stuff, but the registry class _is_ used by the tests
    > without a problem.
    >
    > I first suspected that this was because of some unmanaged code which I use
    > which now resides in the business logic dll, making this assembly somehow
    > "untrusted". However, after commenting out this stuff, the problem still
    > remains.
    >
    > Do you have any advice or direction where to look?
    >
    > Thanks, Sven


  • Next message: Fernando Vicaria [MSFT]: "Re: FileIOPermission"

    Relevant Pages

    • Re: How to use SecurityAction.RequestMinimum for UnmanagedCode
      ... Code in these zones can't call unmanaged code, ... the permission for unmanaged code before making the call. ... security operations that you should not consider lightly, ... I have used a one touch install that gives assemblies ...
      (microsoft.public.dotnet.security)
    • Re: Prob in Ngen Com Addin.
      ... ngen is used for managed code. ... the primary interop assemblies, it does not translate the unmanaged code ... > Interop.MAPI,Interop.Outlook and couple of other dlls. ...
      (microsoft.public.dotnet.framework.performance)
    • Re: Troubleshooting a GC Collection?
      ... The acrobat control is on a dedicated form. ... AssemblyLoad event and log when all referenced assemblies are loaded). ... > problem without any unmanaged code. ... > Animated vector graphics system ...
      (microsoft.public.dotnet.framework.clr)
    • Re: Peace between Native and .NET freaks (a proposal)
      ... > Delphi can easily connect with unmanaged code in other assemblies. ... Yes, through standard interop. ... But that's *exactly* what this compiler ...
      (borland.public.delphi.non-technical)
    • RE: Security Exception after splitting application in different assemblies
      ... You can do this with caspol: ... caspol -rsg <url or path to asm> ... Will show you the code groups that the assembly matches, and the permissions the assemblies get. ... >via the unit test dll though, everything appears to be running fine. ...
      (microsoft.public.dotnet.security)

    Loading