问题:
你发布了一个网站应用到 Windows 7 (64 位)的 IIS 7 服务器上,当你从网页上打开时,显示“试图加载格式不正确的程序”的错误。如:
Server Error in ‘xxx’ Application.
Could not load file or assembly ‘System.Data.SQLite’ or one of its dpendencies.
解决方案:
- 在“运行”框里输入 “inetmgr” 打开 IIS 管理器
- 在“应用程序池”列表中找到你的网站应用所使用的“应用程序池”,如 DefaultAppPool
- 在“高级设置”中,将“启用 32 位应用程序” 设置为 True
- 成功!