Friday, November 4, 2011

.NET interview questions: – CAS model under .NET 4.0

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: - .NET 4.0 CAS model 

Also see as detailed video on CAS which explains evidence, permission set & code groups as follows:

 

Get more for  for interview questions and answers for Dotnet complete preparation.

Regards,

Refer author’s other blog for complete Most asked Dotnet interview question

1 comment:

Vee Eee Technologies said...

Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.