ASP.NET: Could not load file or assembly 'xxxx' or one of its dependencies. An attempt was made to l...

黄页错误提示:

Server Error in '/' Application.

Could not load file or assembly 'WL.Log' or one of its dependencies. An attempt was made to load a program with an incorrect format.
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 'WL.Log' or one of its dependencies. An attempt was made to load a program with an incorrect format.
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 'WL.Log' 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].

 

今天在IIS7上部署ASP.Net MVC的网站时候,总是碰到如题所示黄页错误。因为之前,在IIS7上部署过没有这种错误。依据错误提示,我做了如下几点尝试:

1. 怀疑真如错误信息提示的那样,对于这个程序集‘WL.Log.dll’加载有问题。由于在VS自带的DevIIS运行正常,所以我重新发布了一次。但遗憾的是,问题依旧存在;

2.根据WRN信息,打开regedit.exe找[HKLM\Software\Microsoft\Fusion!EnableLog],但是没有发现Fusion!EnableLog的Key,所以也没有成功;

3.这种情况下,我只能借助Google了,直到发现了这篇文章,找到解决方案。问题就出在,我现在的操作系统是win7 sp1 x64,所以之前,在x86的操作系统中,同样的操作并没有遇到这种问题。

解决方案:

①当前网站打开【高级设置】选项;

image24

 

②在【高级设置】窗口中找到【一般】下的【允许32位应用程序】设置为True,确认。

image_thumb14

③【重启】网站,运行正常。

转载于:https://www.cnblogs.com/hipo/archive/2012/05/03/2480235.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值