Click here to Skip to main content
Click here to Skip to main content
Technical Blog

Tagged as

What is CAS, evidence, permission set & code groups?

, 5 Jun 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
CAS-Code Access Security is a security model which grants or deny permissions to your Assemblies depending on Evidences (like from where the code comes from. Is the code come from internet or has it comes from valid publisher or other source) How CAS works- Before executing any assembly CAS collects

CAS-Code Access Security is a security model which grants or deny permissions to your Assemblies depending on Evidences (like from where the code comes from. Is the code come from internet or has it comes from valid publisher or other source)

How CAS works-

Before executing any assembly CAS collects the  Evidence Values(publisher, source of assembly, does it have strong name) about that assembly and depending on the Evidence values it start assigning permissions to the assembly via Permission set(Permission Set is the collection of permission).

Code Groups- Code Groups are collection of permission that is allocated to an Assembly as per the Evidence values.

We can apply CAS on any assembly using “caspol” to run this go to your Visual Studio Command Prompt and run “caspol”. But because it is very difficult to work through “caspol” we will use .Net framework 2.0 configuration tool for CAS.

To see what kind of permissions an assembly has- right click on runtime security policy from the left hand side tree and select Evaluate Assembly…

To create a permission set-right click on Permission Sets and add new permission set and add permissions as per you.

To change to Code Group-right click on particular code group and change the permission set as per you.

Problems with CAS-

1. Appling CAS is not an easy task.

2. Deployment of code require CAS Setup again

3. CAS doesn’t work on unmanaged code.


License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Akash Ashok Jain
Software Developer (Senior)
India India
I am "Akash Jain" working in IT Industry from last 6 years. From the beginning of my career I worked with C# for both windows and web application. In my short career I worked for 2 Major ERP Applications, e-commerce applications, CMS based applications and also few static websites.
 
I am a MCP for web application for ASP.NET 4.0. I have also done PMP training as project management is one of my interest area.
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.1411019.1 | Last Updated 6 Jun 2014
Article Copyright 2014 by Akash Ashok Jain
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid