Tuesday, September 21, 2004

Giving a Mapped Drive .NET FullTrust

Marquee de Sells: Chris's insight outlet - Giving a Mapped Drive .NET FullTrust

"...you need to add a new Code Group with an URL membership permission specifying the folder (in URL form) to which you'd like to grant full trust. You can do with the .NET Framework Configuration tool or you can do it from the command line like so:

c:\>caspol -q -machine -addgroup 1 -url file://z:/* FullTrust -name "Z Drive"

Once this new code group is in place, any new .NET processes you start will give any assemblies on the Z drive full trust (make sure to cycle the devenv.exe process if you want these new permissions and that message box to go away).

Since awarding new permissions, full trust or not, to any chunk of code is something that can cause a security hole, be careful."

Nice tip on updating your .NET CAS to give Full Trust to a mapped drive...

No comments: