Security changes

  • Until now AvalonLibrary was marked with an AllowPartiallyTrustedCallers attribute, but since it was compiled with the unsafe option, it was impossible to use it under such contexts. The unsafe code (a single method in NativeMethods) was removed, and this limitation has been lifted.
  • This means that the library will now work in XBAPs. Even TaskDialog (as long as you don't call the Show method) can be placed inside an XBAP. Some controls, such as the NotifyIcon and the FolderBrowserDialog demand permissions that are not available in partial trust, so trying to use them will raise a SecurityException.
  • In addition, the library is now uses security transparency. The assembly-level SecurityCritical attribute indicates the code defaults to security-transparent. Throughout the assembly, security-sensitive methods, classes and fields are marked as SecurityCritical, making them inaccessible to security transparent code.

Last edited Nov 1, 2008 at 2:52 AM by aelij, version 1