We have an ActiveX Control calling Microsoft Point of Sale for .NET. However POS doesn't work with .NET 4.0 due to CAS (Code Access Security) which is obsolete for .NET 4.0.
The best resource I've found is on this LavaBlast Blog, however I've been unable to get it to work.
At what point should I be setting this? I didn't think ActiveX controls had configuration files associated with them for this setting, and wouldn't this be a setting on the user's computer and not on a webserver's web.config file?
Here is the code and the specific error:
PosExplorer explorer = new PosExplorer();
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