Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made to load a program

今天同事在一个服务器(winserver 2008 x64)上新建了一个IIS(7) 网站,但是报了如下错误:

      Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made to load a program with an incorrect format. 
       如下图:

       Could not load file or assembly

       刚开始以为是权限问题,设置了所有权限还是报错;

       然后又尝试了应用程序池.NET版本等其他方式,还是没找到原因;

       最后在网上搜索到了解决办法,原来应用程序池的高级选项里面有关于兼容WIN32程序的选项;

       System.Data.SQLite是分了操作系统版本的,有X86,X64之分;因此应用程序池应该选择兼容WIN32;

       Could not load file or assembly