System.security.Policy.PolicyException

  • Thread starter Thread starter Chris Maloney
  • Start date Start date
C

Chris Maloney

When using Visual c++ in Visual Studio.net, I am receiving errors "An
unhandled exception of type 'System.Security.Policy.PolicyException" when
trying to "build withoug debugging". I only receive this error when I(or
students) save the project to the network.

I can't seem to find anything on Microsoft's website. Is there a way around
this? Or do all programs have to be compiled from the local drive?

Thanks,
Chris
 
You can either relax the .Net security policy or define a code group that
includes the specific share that you want to allow code to run from.

In a normal VS 2003 install, start "Microsoft .Net Framework 1.1
Configuration" under "Administrative Tools" in the start menu or control
panel. Select "Configure Code Access Security Policy" from the tool. The
rest should be pretty self explanatory.

VS 2002 has a similar path, but I can't check that right now.

Ronald Laeremans
Visual C++ team
 
Excellent. That took care of it.

Thanks!

Ronald Laeremans said:
You can either relax the .Net security policy or define a code group that
includes the specific share that you want to allow code to run from.

In a normal VS 2003 install, start "Microsoft .Net Framework 1.1
Configuration" under "Administrative Tools" in the start menu or control
panel. Select "Configure Code Access Security Policy" from the tool. The
rest should be pretty self explanatory.

VS 2002 has a similar path, but I can't check that right now.

Ronald Laeremans
Visual C++ team
 
Back
Top