full trus and 1.1 SP1

From: AndrewEames (AndrewEames_at_discussions.microsoft.com)
Date: 03/18/05


Date: Fri, 18 Mar 2005 10:17:05 -0800

I just applied 1.1 SP1 and I am seeing some changes in behavior wrt. security

If I set my security level to no trust, my .NET application will now actualy
execute until Application.Run (previously, it wouldn't even start up without
execute permission)

So great I thought - I can put up a friendly dialog for my users if I dont
have full trust. so I added the following code

      PermissionSet fullTrust = new
PermissionSet(PermissionState.Unrestricted);
      try
      {
        fullTrust.Demand();
      }
      catch(SecurityException)
      {

However, this demand succeeds even if I am running under no trust - why is
this?
  Thanks
      Andrew
 



Relevant Pages

  • Re: Automating Access 2003 from VB 6
    ... their chosen applications safe, & set their macro security level back up. ... By making it impossible for them to say: "I trust application 'X'", ... the evil doers could run it ...
    (microsoft.public.access.modulesdaovba)
  • Adjust the security level for Local Intranet programmatically
    ... adjust the security level for local Interanet to "Full Trust" ... I don't want user change it mannually through Control Panel->Administrative ...
    (microsoft.public.dotnet.security)
  • Re: exporting excel spreadsheet to my msn email
    ... It seems the security level is set to 'High'.You may change it via ... If 2007,then:- Trust Center, and click Trust Center Settings. ... Under Macro Settings, make sure the "Disable all macros with notification" button is checked. ... that says malicious or virus. ...
    (microsoft.public.windows.mediacenter)