Re: CASPOL -addfulltrust



Nicole

Thanks for the help.

Can you give me something a bit more specific?
If my assembly is "fred.exe", and I want it to run from a network share,
what do I need to do?
Do I run CASPOL with the -ag parameter?
What "evidence" do I then need to provide?

My code is running in the Microsoft Dynamics SL "environment", and I don't
think clickonce is an option (although I will look into that).

Thanks

Barry

"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
news:%239dmfgYuHHA.1120@xxxxxxxxxxxxxxxxxxxxxxx
The addfulltrust option doesn't do what you (and many other <g>) think it
ought to. Instead, it simply adds an assembly to a list of assemblies
that are allowed to provide security information to the CLR. To grant
unrestricted permissions to your assembly, try creating a code group with
a full trust permission grant and evidence that matches your assembly.
Alternatively, since you are using .NET 2.0, you might want to consider
deploying as a ClickOnce assembly so that CAS permissions can be elevated
without modifying CAS policy on the client machines.


"Barry Flynn" <Anonymouse> wrote in message
news:uQHVbjRuHHA.536@xxxxxxxxxxxxxxxxxxxxxxx
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: How to determine which permission is being requested?
    ... > 4) I've figured another way of full-trusting my assemblies that I wish to ... This is not good security practice and is dangerous. ... can infect network shares, providing this sort of permission is unsafe. ... Advantage of using publisher of SN evidence is that the code is more easily ...
    (microsoft.public.dotnet.security)
  • Re: Code Access Security Enforcement anamoly - - Thx in advance.
    ... If we look at the documentation and security changes since v1.0 of .NET, ... so that any assemblies under that website would be considered as fully ... > Hi Shawn, ... >> You are probably running into a situation with dynamic compilation. ...
    (microsoft.public.dotnet.security)
  • Re: Am I the only one with doubts about .NET for commercial apps?
    ... > So far, I have found only these two weaknesses, but these are BIG ... harder to do in unmanaged code, no licensing restrictions you add there are ... sense of security by making it clearer how easy it is to do. ... You can make reusing your assemblies a bit harder by using identity demands, ...
    (microsoft.public.dotnet.general)
  • RE: Decleration Excel.Application or what
    ... security error when you call into the NanoSort class. ... When you create and build your VSTO project a .NET security policy is ... assemblies reside rather than just the VSTO assembly and this should correct ...
    (microsoft.public.vsnet.vstools.office)
  • RE: Windows Service cannot create text files?
    ... should know that running your service as the Local System account is Very ... If your service has a single security flaw that is exploited, ... The steps for changing the policy for the user ... This will import the strong name and only assemblies ...
    (microsoft.public.dotnet.languages.vb)