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

From: Robert Jarratt [MSFT] (
Date: 12/15/03

  • Next message: "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
    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
    "surya" <> wrote in message
    > 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: "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 ...
    • 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. ...
    • 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 ...
    • 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. ...
    • 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 ...