CASPOL -addfulltrust



Hi

I'm struggling to come to grips with CASPOL.
I'm experimenting with a small utility program (written in VB 2005) called
Compare_Prog.exe.
From drive c:, it runs successfully.
From a network share, it crashes.

I have executed the following CASPOL command
caspol -m -af s:\compare_prog.exe

I get a warning that I don't understand
"Because all GAC assemblies always get full trust, the full trust list is no
long
er meaningful. You should install any assemblies that are used in security
polic
y in the GAC to ensure they are trusted.
The operation you are performing will alter security policy.
Are you sure you want to perform this operation? (yes/no)"

I don't see what the GAC has to do with my program.
I answer Y, and I get a response "Success"

But, when I run the program it still crashes, with a security exception.

I tried rerunning my CASPOL command, and got the response
"ERROR: This assembly is already fully trusted"

If I enter this command instead

CasPol.exe -pp off -m -ag 1.2 -url file:s:\* FullTrust

ThenI can run the program successfully.

Why doesn't my "addfulltrust" command allow me to run the program?

Thanks

Barry


.



Relevant Pages

  • Re: Word 2003 with VSTO 2003 stops working when .Net Framework Beta 2 is installed
    ... policies using caspol of version 2, but it still did not work. ... Each version of CLR ... I would suggest to manually migrate Fx 1.1 security policies to Fx ...
    (microsoft.public.vsnet.vstools.office)
  • RE: Hi Richard Blewett, regarding the CAS post earlier on!
    ... Are you sure caspol can switch off this: ... Or it removes off the security policy set on the ... "Chua Wen Ching" wrote: ... > Oh i didn't know you can set off the security in CAS. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: network share security - mscorlib
    ... My opinion has been that CASPOL takes effect on the machine it is executed ... the resulting .exe's from the network. ... when I did try I found I had security problems in both areas. ... In Internet Explorer, ...
    (microsoft.public.dotnet.security)
  • RE: deploying app with existing COM
    ... use a SCRUN.DLL(a common com dll) to do some job, ... get exception. ... To isolate if the problem is caused by the CLR security check or underlying ... we can try to use the caspol tool to shut down the clr ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Role-based-Security... just switch it off
    ... Users with administrative privileges can do everything to your system or your application. ... generic user, define roles and a generic principal during startup of ... But if I open a command line and type "caspol -security off" everybody ... What is an elegant way to make sure, that my security policies cannot ...
    (microsoft.public.dotnet.security)