좋아요, 그래서 웹 페이지의 COM 개체를 통해 클라이언트 바코드 스캐너와 상호 작용하는 .Net 컨트롤을 만드는 프로젝트가 있습니다 (IE 만 필요함). 이를 위해, 우리는 개체 태그를 사용하여로드 된 닷넷 윈도우 폼 컨트롤 라이브러리 DLL을 활용 한 :추가 DLL을로드하는 .Net 개체 태그
<object id="scannerCont" classid="http:ControlAssembly.dll#Controls.MyControl"/>
지금까지 내가 웹 페이지에 렌더링하는 닷넷 컨트롤이 들어 왔
,하지만 지금은 컨트롤을 추가 DLL에 액세스 할 수 없기 때문에 문제가 발생합니다. 기본적으로이 컨트롤은 COM interop 액세스를 제공하는 관리되지 않는 DLL을 스캐너 장치에 호출합니다. DLL을 액세스하려고 시도하지 않고 페이지를로드 할 때 잘로드되지만 내가 참조하려고하면 임시 인터넷 파일 폴더에 FusionBindErrors가 수신됩니다.
***** IEHOST Error Log (Friday, 12 October 2012 09:27) *****
URL: http://scanner:8014/scanner/ControlAssembly.dll
Zone: 2
Assembly Name: ControlAssembly.dll
Type Name: Controls.MyControl
----- Thrown Exception -----
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'ActiveScanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
File name: 'ActiveScanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.Security.Policy.PolicyException: Required permissions cannot be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission)
at Controls.MyControl..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateComInstanceFrom(String assemblyName, String typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at Microsoft.IE.SecureFactory.CreateInstanceWithSecurity2(Int32 dwFlags, Int32 dwZone, String wszSite, String wszId, String wszConfig, String wszLicenses, String wszDeploymentManifest)
을 지금, 나는 그것이 권한 문제로 인한 오류를 이해하고 같이 다음과 같이
오류입니다. 당신이 신뢰할 수있는 사이트 목록에 웹 페이지를 추가하라는 응답을하기 전에는 이것이 불가능합니다. 이는 고객이 직면하는 구성 요소이며 대부분은 승격 된 권한을 허용하기 위해 클릭 할 수있는 보안 경고 메시지 만 수신하도록 제출할 수 있습니다.
나는이 문제를 해결하려고 노력해 왔지만 이것이 널리 채택 된 것으로 보이지 않으며이 오류를 완화하는 방법에 대한 문서는 거의 없다.
컨트롤이로드 된 웹 사이트 폴더에서 불필요한 DLL을 제거한 경우 시스템에서이 불필요한 DLL을 한 번로드 할 수 있어야한다는 FusionBindError라는 파일이 나타납니다. 이 사용 권한 문제를 해결합니다 ...
누구나 누구든지이 권한을 얻은 경험이 있습니까? 다시 말하지만, 최종 사용자가 .Net에서이 권한을 부여 할 수있는 권한을 요청하는 팝업을받는 것은 문제가되지 않지만 최종 사용자에게 신뢰할 수있는 영역에 사이트를 추가하도록 요청할 수는 없습니다.
개체 태그에 정보를 추가하여이 다른 DLL이 필요한지 궁금합니다.