Microsoft KB Archive/316855

= INFO: Security Requirements for AppDomain.CreateInstanceFrom =

Article ID: 316855

Article Last Modified on 1/30/2003

-

APPLIES TO


 * Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2

-



This article was previously published under Q316855



SUMMARY
In the Microsoft Developer Network (MSDN) documentation, the &quot;Requirements&quot; section of AppDomain.CreateInstanceFrom does not include the security requirements. The &quot;More Information&quot; section of this article lists the requirements for this method.



MORE INFORMATION
Microsoft .NET Framework Security:
 * SecurityPermission for the ability to call unmanaged code when creating an instance of a delegate. Associated enumeration: SecurityPermissionFlag/UnmanagedCode.


 * ReflectionPermission for the ability to invoke operations on all type members. Associated enumeration: ReflectionPermissionFlag/MemberAccess.


 * FileIOPermission for the ability to search directory paths and read their contents. Associated enumerations: FileIOPermissionAccess/PathDiscovery and Read.

The .NET Framework security policy controls the permissions that are granted to code, based on the evidence about the assembly. The union of the permission sets that are associated with each matching code group at a specified level is computed for an assembly. The permission set that is finally granted to an assembly is an intersection of the permission sets computed at each policy level. In a calling stack, the .NET Framework checks the permissions of each caller in the call stack. If anyone in the call stack has not been granted the permission, a security exception is thrown.

