Tradepoint Business Management Solutions - Everything Business, connected.
Shopping CartCart: 0 Items, Total: $0.00
Login to your Account
Get a FREE Demo - Try Tradepoint for 30 days

CAS Permissions for Plugins in .net 4.0


For the .net 4.0 release, Microsoft has introduces some changes to the the way code security is treated. A summary and explanation of the changes can be found at Security Changes in the .NET Framework 4 ( ).

In the .NET Framework 4, machine-wide security policy is turned off by default. Applications that are not hosted (that is, applications that are executed through Windows Explorer or from a command prompt) now run as full trust. However, if the user's permissions have been modified from the default settings, it is possible for a System.TypeLoadException to be raised when Tradepoint is loading plugins. The exception message would be similar to the following:
Exception: System.TypeLoadException: Inheritance security rules violated by type: '{name of the class without sufficient CAS rights}'. Derived types must either match the security accessibility of the base type or be less accessible.

To relsolve this issue the security level for the plugin should be specified in the AssemblyInfo.cs for the assembly causing the exception and any assembly dependant upon it. To specify the the security level the following declaration can be used:
[assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level2, SkipVerificationInFullTrust = true)]

This affects assemblies that have been complied against the .net 4.0 framework and higher.

Thank you for Adding an Item to your cart

# of Items Added: 1
Total of Items Added: 0.00
Continue Shopping Show Your Shopping Cart