I have created new AppDomain for Sandbox solution with following permissions:
EvidenceBase[] hostEvidence = { new Zone(SecurityZone.Trusted) };
Evidence evidence = new Evidence(hostEvidence, null);
PermissionSet permissions = SecurityManager.GetStandardSandbox(evidence);
Third Party Plugin is loaded successfully how ever some calls return SecurityException and I cant figured out from StackTrace what resources are required that triggers this exception.
How can I get more details from SecurityException?
Code for creating child domain:
AppDomain newDomain = AppDomain.CreateDomain("MySandBox", null, adSetup, permissions, fullTrustAssembly);
ObjectHandle handle = Activator.CreateInstanceFrom(
newDomain, typeof(PluginSandbox).Assembly.ManifestModule.FullyQualifiedName,
typeof(PluginSandbox).FullName
);
newDomainInstance = (PluginSandbox)handle.Unwrap();
