Because the security framework has changed in the .NET 4 runtime, you will likely encounter some exceptions containing a message similar to:
System.NotSupportedException: This method explicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40_LegacySecurityPolicy configuration switch. Please see http://go.microsoft.com/fwlink/?LinkID=155570 for more information.
To avoid this, you� have to enable the legacy support by adding a runtime element :