0

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

dave2118
  • 206
  • 6
  • 22
  • Why can't you just target .NET 3.5 and install that on your POS hardware? – Dai Sep 18 '12 at 18:34
  • Users are being upgraded to .NET 4.0 by their companies, so we have no control over what version of .NET they're running. – dave2118 Sep 18 '12 at 18:35

0 Answers0