“Unverifiable code failed policy check” for a closed source assembly

后端 未结 3 1493
天命终不由人
天命终不由人 2021-01-23 04:36

I\'m attempting to dynamically load some (purchased) assemblies from resource streams in a C# program during an MSI installation routine, but I\'m getting \"Unverifiable code fa

3条回答
  •  悲哀的现实
    2021-01-23 05:17

    Its already too late, but it may help someone.

    I've used Sqlite DLL in my project and when I deployed the code on sandbox environment, I was getting exception (see below)

    [FileLoadException: Unverifiable code failed policy check. (Exception from HRESULT: 0x80131402)]
    
    [FileLoadException: Could not load file or assembly 'System.Data.SQLite, Version=1.0.79.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. Unverifiable code failed policy check. (Exception from HRESULT: 0x80131402)]
    

    I added trust level within system.web in the web.config file and its working fine.

     
    

提交回复
热议问题