How can you turn-on and turn-off CAS ?

 Posted by Bharathi Cherukuri on 3/17/2012 | Category: .NET Framework Interview questions | Views: 3330 | Points: 40
Answer:

You can use the Code Access Security Tool (Caspol.exe) to turn security on and off.

To turn off security, type the following command at the command prompt:
caspol -security off

To turn on security, type the following command at the command prompt:
caspol -security on

In the .NET Framework 4.0, for using Caspol.exe, you first need to set the <LegacyCasPolicy> element to true.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response