无法加载DLL' SQLite.Interop.dll

时间:2018-05-08 04:17:32

标签: sqlite wcf iis

我有一个WCF服务,它将访问SQLite数据库。使用Visual Studio WCF测试客户端,服务可以正常启动,我可以调用服务功能,没有任何错误。但是当我将服务移动到IIS时,在连接到数据库时抛出以下异常:

Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

我的服务平台目标是"任何CPU",dll" System.Data.SQLite.dll"是x86,我是由Nuget下载的。我应该如何设置IIS配置或我的服务以使其工作

1 个答案:

答案 0 :(得分:0)

我通过引用解决了这个问题:https://stackoverflow.com/a/28092497/7352168+
将x86和x64 SQLite.Interop.dll复制到IIS目录。