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