This project has moved. For the latest updates, please go here.


AppDomainExtensionMethods provides several extension methods for the System.AppDomain class. This type is in the Security namespace (not the System namespace), so in order to use these extension methods, you will need to make sure you include this namespace as well as a reference to Security.dll.


System.Security.PermissionSet GetPermissionSet()

Get the permission set that the current AppDomain is sandboxed with. This is the permission set which is used if a security demand crosses the AppDomain boundary.

Permission Requirements:
System.Security.PermissionSet This method requries its immediate caller to be fully trusted

bool IsHomogenous()

Detect if an AppDomain is a simple sandbox style domain, created by passing a PermissionSet to the System.AppDomain.CreateDomain(System.String,System.Security.Policy.Evidence,System.AppDomainSetup,System.Security.PermissionSet,System.Security.Policy.StrongName(array)) call.

Return Value:
True if the domain is a simple sandbox; false if it is a legacy v1.x domain.

bool IsSandboxed()

Determine if an AppDomain is sandboxed

Return Value:
True if the AppDomain has a grant set other than FullTrust

Last edited May 27, 2009 at 9:48 PM by shawnfa, version 3


No comments yet.