.NET interview questions: - Explain CAS model is structured under .NET 4.0?
- By Shiv Prasad Koirala in ASP.NET
- Nov 3rd, 2011
- 5441
- 1
Under .NET 4.0 for CAS there are two major changes are brought in:-
• Permission granting is no more the work of CAS; it's now the work of the hosting model. In other words CAS is disabled in .NET 4.0 by default. The host will decide what rights to be given to the .NET assembly.
• A new security model i.e. Security transparent model is introduced. The security transparent model puts code in to separate compartments/ boxes as per the risk associated. If you know a code can do something wrong you can compartmentalizethe code as ‘Security transparent' and if you have a code which you trust you can box them in to ‘Security critical'.
CAS Model
Security transparent code is the code which you feel is unsafe and security safe critical code is the code which you feel is safe and has full access to the system.
Security transparent code cannot call critical code directly, if they have to then they need to go through security safe critical code.
Figure 2.5: - .NET 4.0 CAS model
Also see as detailed video on CAS which explains evidence, permission set & code groups as follows: -
Get more for Dotnet interview questions and answers for complete preparation.
Regards,
Refer author's other blog for complete important Dotnet interview questions
Shiv Prasad Koirala
Visit us @ www.questpond.com or call us at 022-66752917... read more