Re: Restricting access to Assembly.LoadFrom method to access only certain signed assemblies

From: Robert Jarratt [MSFT] (rjarratt_at_online.microsoft.com)
Date: 12/15/03

  • Next message: anonymous_at_discussions.microsoft.com: "Re: prevent access to web.config"
    Date: Mon, 15 Dec 2003 17:38:56 -0000
    
    

    Have you considered using Code Access Security to give Execution permission
    (and any other relevenat permissions) to assemblies with the relevant strong
    name? This way you would not need to do anything inside your program,
    instead you would be relying on the administrator to say which assemblies
    can be executed. If you want to impose restrictions beyond what can be
    expressed with Runtime Security Policy then you might need to check the
    Evidence associated with the assembly after executing the LoadFrom.

    -- 
    Robert Jarratt
    Microsoft
    rjarratt@online.microsoft.com
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at
    http://www.microsoft.com/info/cpyright.htm
    "surya" <suryanarayanan.varadarajan@honeywell.com> wrote in message
    news:%23NyA4NmvDHA.1596@TK2MSFTNGP10.phx.gbl...
    > Hi,
    >
    > I use the Assembly.LoadFrom call in my code to load assemblies
    > dynamically.This call currently loads both signed and unsigned assemblies.
    >
    > It now needs to be changed to load only certain signed assemblies. The
    > administrator should be able to configure the public keys that are trusted
    > and my code should only load those strongly signed assemblies with the
    > public keys specified by the administrator.
    >
    > Is there an easy way to implement this?
    >
    >
    > Thanks in advance
    >
    > Regards
    > Surya
    >
    >
    >
    >
    >
    

  • Next message: anonymous_at_discussions.microsoft.com: "Re: prevent access to web.config"

    Relevant Pages

    • Re: Dotfuscator and ClickOnce
      ... it's not recommended to strong-name application EXE assemblies. ... Dotfuscator gets kicked off multiple times. ... you'll see the detailed information on the execution of the ... Microsoft Online Community Support ...
      (microsoft.public.dotnet.languages.vb)
    • Re: Issues with Reflection.Assembly.LoadFile(string)
      ... It occurs intermittently during the execution of the application. ... The project is developed as a Windows Service executing assemblies using Reflection.Assembly.LoadFilemethod. ... When the service executes an assembly, the exact path is passed to the LoadFile method. ...
      (microsoft.public.vsnet.general)
    • Re: Assembly could not be installed because existing policy would keep it from being used
      ... safe assemblies. ... Assembly 'MyAssembly' could not be installed because existing policy ... policies and they all seem to allow execution. ...
      (microsoft.public.sqlserver.security)
    • Access denied loading satellite assembly using Identity
      ... I have a web application that use sattellite assemblies to make it ... provided by the hosting provider, now when the application tried to load the ... Is there is any way to load a resource satellite assembly besides this ... An unhandled exception occurred during the execution of the ...
      (microsoft.public.dotnet.security)
    • Re: Treads Vs Process
      ... whose name it finds in an xml file i have pointed it to. ... I also want it to create .net objects from assemblies ... execution unless you explicitly create a thread of execution call into ... a process is a notional owner of a set of resources that are ...
      (microsoft.public.dotnet.general)