I am using Microsoft.PointOfService.dll to instantiate explore the printer functionality in a class library. When i am inheriting that class library from a .cs code its working fine. But when i am using that class library to create a cab file to work as an ActiveX control and calling the same method from javascript, it is not instantiating the PosExplorer and giving the exeception as “The type initializer for ‘Microsoft.PointOfService.Management.Explorer’ threw an exception.”
I have used the config file and inserted the <NetFx40_LegacySecurityPolicy enabled="true"/>
Do i need any additional things to do while creating setup file.
Add the following code to your app.config (It will definitely work on .net 4.0, can you tell me which version are you using?)
If it doesn’t work then you can also try to open the location :
C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.exe.config
In this file add the following line