samedi 16 décembre 2017

Restricted AppDomain invoke method via reflection and passing boxed argument

i created new restricted AppDomain and loaded some assemblies to this AppDomain, but when i try to invoke method via reflection Security Exception occurs when my argumet is boxed to object, when argument type exactly equal to parameter type it works as expected, what permission i should add to pass boxed parameters ?

I use these permissions:

        var ps = new PermissionSet(PermissionState.None);
        ps.AddPermission(new SecurityPermission(PermissionState.Unrestricted));
        ps.AddPermission(new FileIOPermission(FileIOPermissionAccess.AllAccess, pluginPath));
        ps.SetPermission(new ReflectionPermission(PermissionState.Unrestricted));





Aucun commentaire:

Enregistrer un commentaire