• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

ASP.NET:Couldnotloadfileorassembly'xxxx'oroneofitsdependencies.Anattemptwasmadet ...

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

黄页错误提示:

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的操作系统中,同样的操作并没有遇到这种问题。

解决方案:

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

 

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

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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Asp.Net Ajax--Passwordstrength控件使用发布时间:2022-07-10
下一篇:
asp.net 负载平衡发布时间:2022-07-10
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap