NetFx40_LegacySecurityPolicy

User administration sometimes generates this error message:

This method implicitly 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. 

Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
 
Exception Details:
System.NotSupportedException: This method implicitly 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.
 
How to fix it:
 
In IIS 7.5 above:
 
Open web.config and add this into the file:
 

<configuration>

  <runtime>

    <NetFx40_LegacySecurityPolicy enabled="true" />

  </runtime>

</configuration>

 

Still not working?

Then you need to add the section to:

%windir%/Microsoft.NET/Framework/v4.0.30319/aspnet.config

Example:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Aspnet.config

and if running 64bits server:

%windir%/Microsoft.NET/Framework64/v4.0.30319/aspnet.config

Example:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet.config

and restart the Internet Information Services (w3wp.exe) services or restart the machine.

If server is in production enviroment it is possible to only recycle the application pool for Analyze PRO.