I find it extraordinarily difficult (okay… inconvenient?) to make Code Access Security Policy changes in the .NET Framework. After .NET 2.0, outside of the SDK, the graphical tools for doing this were no longer installed on most client PC’s. Usually, when I have to break out caspol.exe, it’s possibly because:
- I downloaded a third party DLL from a web site, and it’s not trusted, with no unblock option, and Visual Studio is complaining about it when I’m actually trying to get some real work done
- I want to run some .NET apps off a network share, and the machine I’m using doesn’t have .NET 3.5 SP1.
… and it’s used so infrequently that I have to look up all the command line options and re-learn the thing every time, not to mention when I finally get the command right, I’m not in Elevated Privileges mode (Vista / Win 7).
So, for those like me, who like GUIs, and just want to get an assembly or folder trusted and move on with life, I present to you – a GUI CASPOL command generator:
This supports a subset of the available CASPOL commands:
- Single file / assembly
- Folder path / network share
- Different scopes (Machine / User / Enterprise)
- Trust Level (FullTrust by default)
- Code Groups
- Run CASPOL command in Elevated mode
For the small executable - Download It Here (9K)