CAS and Office Development.
From: Scott Gauthier (-)
Date: Fri, 17 Jun 2005 16:55:49 -0500
I have been trying, unsuccessfully, to get an Excel Microsoft Office System
Project to run on my computer for the past couple of days, each time I try I
get the wonderful "The current .NET security policy does not permit <Project
Name> to run from folder <folder name>..."
the first thing I tried to do was just simply use the wizard that came with
the office .net dev tools. It created the project, the associated code
behind class and the User based code group security policy but the project
refuses to run giving me the above error each time I try.
I then read the following article by Ken Getz and Brian Randell:
and then tried the Strong Name method described at the bottom of the
document but this still did not allow me to execute the code. Feeling
baffled I tried it on another computer and it work fine, no problem.
What I have done thus far:
- created a strong named key file and associated with my assembly via the
- complied the assembly
- created a machine based code group under the my_computer_zone code group
with the fulltrust permisson set for the strong name embedded within my
- In excel, modified the _AssemblyLocation0 custom property to refer to the
folder my assembly is located in.
- works on other machines not mine.
I even right clicked on the "Runtime Security Policy" node in the CAS tree
and clicked "Reset All..." to restore all the policies to their default
state and then reinstalled my code group but still have no luck.
I even tried the CASPOL.exe -s off option and then tried and still had no
Like I said I was able to get this working very easily on another computer
using the strong named method.
Could someone please throw some advice my way...
I have all the frameworks installed on it: 1.0, 1.1 and 2.0, not that
this should matter but I figured I would throw it out there anyways...
Thanks in advance