Code Access Security Policy (CASPOL.exe) GUI Utility
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)
Great utility. Even if user doesn’t have administrative rights, log in/password screen shows up. It has many parameters and also shows generated “caspol.exe” parameters.
Turker Tunali
February 10, 2010 at 3:04 am
hello friend!
you have done a wonderful job
thank you
ARULKUMAR
February 18, 2010 at 3:49 am
Thank you so much. U must be an angel straight from God.
rennie Lative
February 25, 2010 at 9:05 am
hi there!
it’s an incredible tool it has helped me a lot!
thanks!
bpbrainiak
April 26, 2010 at 4:31 pm
10x TNX !!!
mario
July 26, 2010 at 7:35 am
Why couldn’t the jack wagons at MS have just provided this tool? Some of us need things like this on RARE ocassions. And because its RARE, we can’t be expected to remember all of the commands. We shouldn’t have to wade through pages of switch descriptions to figure out how to execute one line of code!!
THANK YOU! THANK YOU!
Lynn Huff
August 13, 2010 at 10:37 am
thanks alot man.. life saver…
jerome nicholas
September 20, 2010 at 3:36 pm
When browsing for a folder I only had the option to look under My Computer, not My Network Places. I need to select a full UNC path to a network share so this is a problem.
I could copy and paste it manually, but then why use this tool? The idea for me anyway is to take out the human error from manually putting together the command.
CheesyPeteza
October 22, 2010 at 5:37 am
@CheesyPeteza, if you can already copy and paste it manually and would save you more time than using the tool, then by all means, do what’s best for you. However, if you want to customize it to fit your particular need, the source code is posted at the bottom of the post.
Brandon
October 22, 2010 at 6:47 am
No problem I will alter it, I just thought you might want to change it for others.
I’ll be mainly giving this to others to use and I don’t like to say, here use this, oh btw you can’t … so you have to …
I prefer, here use this.
CheesyPeteza
November 2, 2010 at 4:22 am
This is not working for .net Framework 4.0. Any idea why?
Ioana
April 19, 2011 at 9:14 am
Thank you SO MUCH. You just saved me some time. Time that I can enjoy, rather than time figuring out how to properly use caspol.exe. Microsoft should provide a GUI just like this. Instant Karma coming your way.
dan
September 18, 2011 at 1:41 pm
Comments like that make code worth writing!
Thanks Dan.
Brandon
September 18, 2011 at 9:18 pm
Thank you!
dewitte
August 27, 2012 at 3:04 pm
Thank you, Brandon. Regards from Spain.
Ivan Ferrer
October 18, 2012 at 7:48 pm