On Monday I wrote about how to recover CasPol to a usable state, if you've modified the security policy to disallow CasPol permission to run. My instructions included deleting %WINDIR%\Microsoft.Net\Framework\vx.y.zzzz\config\Security.config and Security.cch. I've gotten a few emails that correctly pointed out that this only clears the Machine policy level. Since this is the level where most modifications occur, this is usually sufficient to clear up the CasPol problem.
For the sake of completeness I'll show where the other policy levels are stored. This might be useful if you've modified another level to prevent CasPol from running, or if you'd like a backup of your security settings.
The AppDomain level is not persisted to disk, for obvious reasons. The vx.y.zzzz are version strings. Currently they are:
You may or may not have these files, depending upon if you have any policy on each specific level. The policy stored in the .config files is in standard XML format. Obviously performance would suffer if the CLR had to parse three XML files in order to determine the security settings, so that's where the .cch files come into play. Any file that has .cch in its extension (sometimes there will be numbers after the .cch as well), are essentially compiled versions of the security configuration for a specific policy level.
Updated 2/8/2006: Added the v2.0 final policy location