文章类型: .NET
关键词: dotnet,CSharp,BadImageFormatException,试图加载格式不正确的程序,加载程序失败
内容摘要: .NET发布网站运行时出现:System.BadImageFormatException: Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. 试图加载格式不正确的程序

.NET发布网站运行时出现:System.BadImageFormatException: Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. 试图加载格式不正确的程序

2017/12/4 8:50:26    来源:apple    阅读:

Web

异常类型

System.BadImageFormatException异常消息Could not load file or assembly 'Interop.zkemkeeper' or one of its dependencies. 试图加载格式不正确的程序。

或者:"System.BadImageFormatException: Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. 试图加载格式不正确的程序"

异常环境当我把编译好的程序托管到IIS下后,访问时出现了以下问题,服务器环境是IIS 7,操作系统 Windows 7。

解决方法出现上述问题的原因是,所加载的程序集中有32位的,也有64位的,IIS 7 程序池 在Windows下.Net FrameWork是64位的,要想正确使用,需要对程序池进行配置。如下图所示:

blob.png
WinForm:下

blob.png

↑ 上一篇文章:VC++下的GetWindowRect和GetClientRect 关键词:VC,GetWindowRect,GetClientRe.. 发布日期:2017/11/30 17:10:04
↓ 下一篇文章:搭建Android环境没有platform-tools文件夹 关键词:sdk,搭建,Android,环境,没有,platfor.. 发布日期:2017/12/6 16:50:51
相关文章:
winform中为ComboBox控件添加“请选择”或“全部”选项及使用时的注意事项 关键词:dotnet,CSharp,winform,ComboBox,控件,添加,请选择,全部,使用,注.. 发布日期:2018-08-16 17:03
C#的WinForm开发中AutoComplete 输入提示、自动补全 关键词:C#,CSharp,WinForm,TextBox,AutoComplete,输入提示,自动补全.. 发布日期:2016-01-21 21:08
C# 格式化字符串,日期,字符串操作汇总 关键词:日期,DateTime,Time,C#,CSharp,String,string,字符串操作,格.. 发布日期:2015-07-28 12:11
相关目录:.NET
我要评论
正在加载评论信息......