Code Access Security Policy Tool
-
I am trying to use the Code Access Security Policy Tool (Caspol.exe) to set my .net console app permissions. When the following is run from command line:
caspol -machine -addfulltrust C:\Program Files\Utility.dll
I get this error:Microsoft (R) .NET Framework CasPol 1.1.4322.573 Copyright (C) Microsoft Corporation 1998-2002. All rights reserved. ERROR: Unable to load assembly Usage: caspol ... caspol -af caspol -addfulltrust Add full trust assembly to policy level
What needs to be done to resolve this error? Second question is there a better way of scripting the setting of trusted assemblies? Thanks, Jason W. -
I am trying to use the Code Access Security Policy Tool (Caspol.exe) to set my .net console app permissions. When the following is run from command line:
caspol -machine -addfulltrust C:\Program Files\Utility.dll
I get this error:Microsoft (R) .NET Framework CasPol 1.1.4322.573 Copyright (C) Microsoft Corporation 1998-2002. All rights reserved. ERROR: Unable to load assembly Usage: caspol ... caspol -af caspol -addfulltrust Add full trust assembly to policy level
What needs to be done to resolve this error? Second question is there a better way of scripting the setting of trusted assemblies? Thanks, Jason W.Why does that path you specified look like it's bad? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
I am trying to use the Code Access Security Policy Tool (Caspol.exe) to set my .net console app permissions. When the following is run from command line:
caspol -machine -addfulltrust C:\Program Files\Utility.dll
I get this error:Microsoft (R) .NET Framework CasPol 1.1.4322.573 Copyright (C) Microsoft Corporation 1998-2002. All rights reserved. ERROR: Unable to load assembly Usage: caspol ... caspol -af caspol -addfulltrust Add full trust assembly to policy level
What needs to be done to resolve this error? Second question is there a better way of scripting the setting of trusted assemblies? Thanks, Jason W.You might also want to put the full path to the assembly in quotes so it's not parsed up as two seperate arguments:
caspol -machine -addfulltrust "C:\Program Files\Utility.dll"
Are you sure this is the correct path? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome