An Overview of Code Access SecurityThe Core Concepts: Evidence, Permissions, and PolicyEvidencePolicyPolicy LevelsDefault CAS PolicyPermissionsRuntime Enforcement of Permissions: Permission Demands and the Stack WalkCustomizing the Code Access Security System Using a HostSecurityManagerCode Access Security in the Cocoon HostStep 1: Provide an Initial Implementation of HostSecurityManagerStep 2: Create Custom EvidenceStep 3: Create a Custom Membership ConditionStep 4: Create an Application-Domain-Level Policy TreeStep 5: Assign Custom Evidence to Assemblies in the CocoonAssigning Evidence Using the Assembly Loading APIsPutting It All TogetherAssociating Evidence with an Application DomainThe AllowPartiallyTrustedCallers AttributeSummary