I am creating a web application which will run on a local machine. I am trying to write code on the print button.
While initializing new PosExplorer() I get the error:
The type initializer for ‘Microsoft.PointOfService.Management.Explorer’ threw an exception.".
In the inner exception: "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."
I have installed microsoft POS for .net 1.12 and have also tried using NetFx40_LegacySecurityPolicy enabled="true" in the web.config as well as devenv.exe.config file, but none of them resolved my issue.
I am using vs 2010.
Any help will be highly thanked…
Resolved the issue by adding
in to the path
C:\Program Files\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.exe
And restart the development environment.
Thanks