問題:更新門將後,執行OGServer出現錯誤:[Could not load file or assembly 'file:///C:\Program Files\TQuark\OGSystem\OGServer\Driver\DriverSoyal.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)]

徵狀

更新門將後,執行OGServer,Console畫面出現錯誤

2023/04/25 14:09:22 | Could not load file or assembly 'file:///C:\Program Files\TQuark\OGSystem\OGServer\Driver\DriverSoyal.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) /br> An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
2023/04/25 14:09:22 | 於 System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
於 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
於 System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
於 System.Reflection.Assembly.LoadFrom(String assemblyFile)
於 TQuark.Lib.Core.ReflectionHelp.CreateInstance(String typeName, String assemblyPath, String assemblyExtension)
於 TQuark.Lib.Attendance.AttendanceDeviceModelConfigure.AddDriver(IAttendanceDeviceModelAdapter adapter, XmlElement transactionElement)
於 TQuark.Lib.Attendance.AttendanceDeviceModelConfigure.AdjustModel(IAttendanceDeviceModelAdapter adapter)
於 TQuark.OG.Server.OGServerAgent.InitAttnSystem(String serverNo, ServerAreaDbTable serverAreaDbTable, AttendanceServer& attendanceServer, IDoorGuardSystem& guardSystem)
於 TQuark.OG.Server.OGConsoleServer.InitAttnSystem(String serverNo, ServerAreaDbTable serverAreaDbTable, AttendanceServer& attendanceServer, IDoorGuardSystem& guardSystem)
於 TQuark.Module.Guard.Win.Door._DoorConsoleServer.OnBeforeLooping(EventArgs e)
於 TQuark.OG.Server.OGConsoleServer.OnBeforeLooping(EventArgs e)
於 TQuark.Module.Guard.Console._ConsoleServer.Run()

原因

此門將更新檔從此電腦不信任的網站中下載,導致此電腦封鎖該檔,不允許門將動態載入此dll檔。
該檔案按右鍵[內容],可確認被封鎖。

解決方案

下列三個方案,擇一均可。

  1. 將下載檔案先解除封鎖後,再做解壓縮。
  2. 將被封鎖的檔案,按右鍵[內容],解除封鎖。
  3. 先將https://www.tquark.com.tw加入信任的網站,再做下載。

最終審定

最後檢閱日期:2023/04/28
適用門將版本號:1.0含以上
問題編號:2023042801