Проблема

Сервер на тесте не стартует. В Windows Logs ошибка

 

Service cannot be started. System.TypeInitializationException: The type initializer for 'NLog.Config.ConfigurationItemFactory' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Softwell\iWell\Server\Nlog.Wcf.Target.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) ---> System.NotSupportedException: 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.
 
--- End of inner exception stack trace ---
 
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& st...

Решение

  1. Найдите файл Nlog.Wcf.Target.dll

  2. Откройте свойства файла
  3. Проверьте не заблокирован ли файл windows
  4. В случае, если файл заблокирован windows, нажмите разблокировать (unblock)
  5. Запустите службу сервера iWELL.

Похожие статьи