Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/11 15:10:33 (13 years ago)
Author:
gkronber
Message:

#831: removed unnecessary method to load assemblies from byte arrays from SandboxApplicationManager. Minor changes in SandboxManager.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Sandboxing/SandboxManager.cs

    r6487 r6538  
    2525using System.Security.Permissions;
    2626using HeuristicLab.PluginInfrastructure.Manager;
     27using System.IO;
    2728
    2829namespace HeuristicLab.PluginInfrastructure.Sandboxing {
     
    6970      //needed for HeuristicLab.Persistence, see DynamicMethod Constructor (String, Type, array<Type []()>[], Type, Boolean)
    7071      pSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlEvidence));
    71 
    72       ReflectionPermission refPerm = new ReflectionPermission(PermissionState.Unrestricted);
    73       pSet.AddPermission(refPerm);
     72      pSet.AddPermission(new ReflectionPermission(PermissionState.Unrestricted));
    7473
    7574      FileIOPermission ioPerm = new FileIOPermission(PermissionState.None);
    7675      //allow path discovery for system drive, needed by HeuristicLab.Persistence: Serializer.BuildTypeCache() -> Assembly.CodeBase
    77       ioPerm.AddPathList(FileIOPermissionAccess.PathDiscovery, Environment.SystemDirectory.Substring(0, 3));
     76      ioPerm.AddPathList(FileIOPermissionAccess.PathDiscovery, Path.GetPathRoot(Path.GetFullPath(Environment.SystemDirectory)));
    7877      //allow full access to the appdomain's base directory
    7978      ioPerm.AddPathList(FileIOPermissionAccess.AllAccess, applicationBase);
Note: See TracChangeset for help on using the changeset viewer.