【问题描述】

Server Error in '/' Application.


Could not load file or assembly 'WebDemo' or one of its dependencies. 试图载入格式错误的程序。

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'WebDemo' or one of its dependencies. 试图载入格式错误的程序。

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'WebDemo' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

【解决方案】

IIS->应用程序连接池->项目 高级设置->启用32位应用程序->True

异常System.BadImageFormatException的更多相关文章

  1. .net应用程序安装部署时异常 Error 1001. 在初始化安装时发生异常 System.BadImageFormatException:未能加载文件或程序集 的解决办法【成功解决】

    采用.net 4.0框架开发的一个桌面应用程序在某学校的一体机(Windows7的32位操作系统)上做安装部署时抛出异常,安装程序回滚,多次尝试仍不成功. Error 1001. 在初始化安装时发生异 ...

  2. InstallUtil.exe版本引起安装windows services 服务遇到的问题,System.BadImageFormatException

    原文:把程序安装成windows服务的过程及遇到的问题 做好了定时任务的程序,要把它放在服务器上,作为windows服务运行,也就是说,退出登录,用户注销后程序任然在后台运行. 将exe程序发布为服务 ...

  3. 异常:System.BadImageFormatException,未能加载正确的程序集XXX

    IDE:VS2015 语言:C# 异常:System.BadImageFormatException,未能加载正确的程序集XXX或其某一依赖项... 一般是由于目标程序的目标平台与其某一依赖项的目标编 ...

  4. System.BadImageFormatException: 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)

    原文 System.BadImageFormatException: 试图加载格式不正确的程序. (异常来自 HRESULT:0x8007000B) 用C#调用DLL文件,运行后报错如下: Syste ...

  5. “System.BadImageFormatException”类型的未经处理的异常在 PurchaseDevices.Access.dll 中发生 其他信息: 未能加载文件或程序集“System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139”或它的某一个依赖项。试图加载格式不正确

    引用sqlite的程序集时,有时会报如下异常:  "System.BadImageFormatException"类型的未经处理的异常在 PurchaseDevices.Acces ...

  6. 异常详细信息: System.BadImageFormatException: 未能加载文件或程序集“Maticsoft.Common”或它的某一个依赖项。试图加载格式不正确的程序。

    异常详细信息: System.BadImageFormatException: 未能加载文件或程序集“Maticsoft.Common”或它的某一个依赖项.试图加载格式不正确的程序. 解决方法: 点击 ...

  7. 异常:System.BadImageFormatException,未能加载正确的程序集XXX或其某一依赖项

    常:System.BadImageFormatException,未能加载正确的程序集XXX或其某一依赖项 看到这个异常,我估计谁都会头大一阵子,不过还好,由于前面知道要设置为x86,加上以前观察过I ...

  8. visual studio 调试时遇到 System.BadImageFormatException

    System.BadImageFormatException”类型的未经处理的异常在 未知模块. 中发生 其他信息: 未能加载文件或程序集“SendYourIP.exe”或它的某一个依赖项.生成此程序 ...

  9. System.BadImageFormatException”C#报错

    在平常的开发中或多或少会遇到一些问题,而本次向小编这里是自己刚刚解决的一个问题,贴出来与大家分享一下,纠结了一个下午,终于解决了,是有关平台的一个报错问题.   方法/步骤     报错”“Syste ...

随机推荐

  1. sshd服务防止暴力破解

    sshd防止暴力破解几种方式: 1.密码足够复杂 2.修改默认端口号 3.不适用root用户名登录. #是否可以禁止root身份登录?不行,因为有些程序需要使用root什么登录,另外判断一个用户是不是 ...

  2. [深入Maven源代码]maven绑定命令行参数到具体插件

    maven的插件 我们知道Maven具体构建动作都是由插件执行的,maven本身只是提供一个框架,这样就提供了高度可定制化的功能,我们用maven命令执行比如mvn clean package这样的命 ...

  3. Python高级特性:迭代器和生成器 -转

    在Python中,很多对象都是可以通过for语句来直接遍历的,例如list.string.dict等等,这些对象都可以被称为可迭代对象.至于说哪些对象是可以被迭代访问的,就要了解一下迭代器相关的知识了 ...

  4. intellij idea 怎么全局搜索--转

    https://jingyan.baidu.com/article/29697b9163ac7dab20de3cbf.html intellij idea是一款智能,功能强大的ide,对比eclips ...

  5. offsetHeight,scrollHeight,clientHeight,scrollTop以及pageX,clientX,offsetX,screenX,offsetLeft,style.left等的区别以及使用详解

    一.写在前面 在阅读本文前,希望大家能针对每个属性亲手测试,网上现有的大量相关博客都有不等的概念错误,毕竟亲手实践才能更好的掌握这些概念. 1.pageX,clientX,screenX与offset ...

  6. python 使用 matplotlib.pyplot来画柱状图和饼图

    导入包 import matplotlib.pyplot as plt 柱状图 最简柱状图 # 显示高度 def autolabel(rects): for rect in rects: height ...

  7. MWeb 生成静态网站&博客

    MWeb 生成静态网站 & 博客 MWeb 的静态网站分类 在 MWeb 的文档库中,有两种分类,一种是普通分类,另一种就是静态网站分类了.你可以直接新增一个静态网站分类,也可以在普通分类的顶 ...

  8. C# Owin 创建与测试自己的中间件Middleware(二)

    本文纯属介绍怎么简单地创建自己的Owin.还没有理解owin概念的请看上一篇文章:http://www.cnblogs.com/alunchen/p/7049307.html 目录 1.创建项目 2. ...

  9. WPF TreeView 选择事件执行两次,获取TreeView的父节点的解决方法

    1.TreeView选择事件执行两次 Very often, we need to execute some code in SelectedItemChanged depending on the ...

  10. ADO.NET 【攻击及防御】

    sql字符串注入攻击 SQL注入攻击是黑客对数据库进行攻击的常用手段之一.SQL注入的手法相当灵活 SQL注入攻击会导致的数据库安全风险包括:刷库.拖库.撞库. 一般来说,SQL注入一般存在于形如:H ...