로컬 컴퓨터에서 실행할 웹 응용 프로그램을 만들고 있습니다. 인쇄 버튼에 코드를 쓰려고합니다.'Microsoft.PointOfService.Management.Explorer'의 형식 이니셜 라이저에서 예외가 발생했습니다.
새로운 초기화하는 동안 PosExplorer()
나는 오류 얻을 :
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."
내가 설치 한 마이크로 소프트 POS .NET 1.12을 또한 파일을 web.config
에 NetFx40_LegacySecurityPolicy enabled="true"
를 사용하여뿐만 아니라 devenv.exe.config
시도했지만, 그들 중 누구도 내 해결하지 발행물.
나는 경로 C에
<runtime>
<NetFx40_LegacySecurityPolicy enabled="true"/>
을 추가하여