<legend id='aWxUL'><style id='aWxUL'><dir id='aWxUL'><q id='aWxUL'></q></dir></style></legend>
  • <i id='aWxUL'><tr id='aWxUL'><dt id='aWxUL'><q id='aWxUL'><span id='aWxUL'><b id='aWxUL'><form id='aWxUL'><ins id='aWxUL'></ins><ul id='aWxUL'></ul><sub id='aWxUL'></sub></form><legend id='aWxUL'></legend><bdo id='aWxUL'><pre id='aWxUL'><center id='aWxUL'></center></pre></bdo></b><th id='aWxUL'></th></span></q></dt></tr></i><div id='aWxUL'><tfoot id='aWxUL'></tfoot><dl id='aWxUL'><fieldset id='aWxUL'></fieldset></dl></div>

  • <tfoot id='aWxUL'></tfoot>
      1. <small id='aWxUL'></small><noframes id='aWxUL'>

          <bdo id='aWxUL'></bdo><ul id='aWxUL'></ul>

        错误:无法加载 log4net 程序集

        Error: Could not load log4net assembly(错误:无法加载 log4net 程序集)

              <small id='IniQZ'></small><noframes id='IniQZ'>

                <legend id='IniQZ'><style id='IniQZ'><dir id='IniQZ'><q id='IniQZ'></q></dir></style></legend>
              1. <i id='IniQZ'><tr id='IniQZ'><dt id='IniQZ'><q id='IniQZ'><span id='IniQZ'><b id='IniQZ'><form id='IniQZ'><ins id='IniQZ'></ins><ul id='IniQZ'></ul><sub id='IniQZ'></sub></form><legend id='IniQZ'></legend><bdo id='IniQZ'><pre id='IniQZ'><center id='IniQZ'></center></pre></bdo></b><th id='IniQZ'></th></span></q></dt></tr></i><div id='IniQZ'><tfoot id='IniQZ'></tfoot><dl id='IniQZ'><fieldset id='IniQZ'></fieldset></dl></div>

                • <bdo id='IniQZ'></bdo><ul id='IniQZ'></ul>
                • <tfoot id='IniQZ'></tfoot>
                    <tbody id='IniQZ'></tbody>
                  本文介绍了错误:无法加载 log4net 程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在寻找解决这个错误:

                  <块引用>

                  无法加载文件或程序集 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' 或其依赖项之一.系统找不到指定的文件."此错误位于 web.config 文件中.

                  当我将 log4net.dll 复制到我的 webapp 的 bin 目录时,我得到一个

                  <块引用>

                  无法加载文件或程序集 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' 或其依赖项之一.找到的程序集的清单定义与程序集引用不匹配.

                  web.config 文件中也会出现此错误.

                  更改版本和公钥标记以匹配文件非常容易,以便正确加载程序集.当我这样做时,我的网站运行完美,除了初始化 reportViewer 对象时.然后它会在 reportViewer 标记而不是 web.config 中引发原始错误.

                  我的假设是,如果我安装请求版本的 log4net.dll,我的问题就会得到解决.但我不知道它是哪个文件,或者在哪里可以找到它.我通过下载 log4net 1.2.10 并尝试下载中的每个 dll 来检查明显的情况.

                  我应该提到该网站在我的开发机器上运行没有问题,但在发布到我的服务器时却没有.

                  我在 Server 2008 R2 操作系统上运行一个 asp.net 网站、.NET 4.0、IIS 7.我已经为 64 位安装了 Crystal Reports 13.0.1(我的机器是 64 位的).

                  我该如何解决这个问题?

                  为了回应@Kevian 的回答,我对我的 web.config 文件进行了更改.我仍然收到清单定义与程序集引用不匹配的错误.抛出此错误的代码是:

                  33 行:<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true"34 行:BestFitPage="True" ToolPanelView="None"/>

                  解决方案

                  这里有几个问题可以解决:

                  1. 32 位版本 log4net.dll 的公钥标记与 Crystal Reports 使用的公钥标记冲突.要验证您是否遇到此问题,请在所有 .csproj 文件中搜索692fbea5521e1304" - 如果您看到对 CrystalDecisions 的引用AND log4net 你有这个问题.
                  2. 32 位版本的 log4net.dll 与为 64 位或 AnyCPU 架构编译的 dll 发生冲突.如果您遇到此问题,您将找到如下所示的参考.您可以通过将应用程序池重新配置为以 32 位运行并检查应用程序是否运行来验证问题 - 如果运行,则说明您遇到了这个问题.

                  <块引用>

                  64 位中为我们工作的修复是获取最新的 log4net.dll,它实际上有一个新的 PublicKeyToken,替换你的 3rd 方 bin 文件夹中的 log4net.dll,并且将所有 log4net.dll 引用更改为如下所示:<块引用>I am looking to solve this error: 
                    Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified." This error is located in the web.config file.
                  When I copy log4net.dll to the bin directory of my webapp, I get a 
                    Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
                  This error also occurs in the web.config file.
                  
                  It's easy enough to change the version and the public key token to match the file so that the assembly loads correctly. When I do that, my website runs perfectly, except for when a reportViewer object is initialized. Then it throws the original error at the reportViewer tag, not the web.config. 
                  
                  My hypothesis is that if I install the requested version of log4net.dll, my problems will be solved. But I have no clue which file that it, or where to find it. I've checked the obvious by downloading log4net 1.2.10 and trying out every dll in the download. 
                  
                  I should mention that the website runs without issues on my development machine, but not when published to my server. 
                  
                  I'm running an asp.net website, .NET 4.0, IIS 7, on a Server 2008 R2 OS. I've installed Crystal Reports 13.0.1 for 64bit (my machine is 64bit).
                  
                  How can I resolve this issue?
                  
                  EDIT:
                  In response to @Kevian's answer, I have made the change to my web.config file. I still get the error where the manifest definition doesn't match the assembly reference. The code that throws this error is:Line 33:     <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"   AutoDataBind="true"
                  Line 34:         BestFitPage="True" ToolPanelView="None" />
                  
                   解决方案 There are a couple of issues at play here that are resolvable:
                  The public key token for the 32bit version of log4net.dll clashes with the one used by Crystal Reports. To verify if you have this problem, do a search for "692fbea5521e1304" in all of your .csproj files - if you see references to CrystalDecisions AND log4net you have this problem.
                  The 32bit version of log4net.dll clashes with dlls that are compiled for 64-bit or AnyCPU architecture. If you have this problem, you will find the references that look like below. You can verify the problem by reconfiguring your application pool to run as 32bit and checking to see if the app runs - if it does, you have this problem.
                  
                  
                  
                  <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, 
                  PublicKeyToken=692fbea5521e1304, processorArchitecture=x86" >
                  The Fix that worked for us in 64-bit was to get the latest log4net.dll which actually has a new PublicKeyToken, replace the log4net.dll in your 3rd party bin folder, AND change all of the log4net.dll references to look like so:
                  <Reference Include="log4net, Version=1.2.10.0, Culture=neutral,
                  PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
                  
                  
                                          这篇关于错误:无法加载 log4net 程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
                                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!
                                  
                  上一篇:在卷纸上打印 下一篇:Crystal Reports - 如何抑制组第一页上的页眉?
                  相关文档推荐 在 .NET 中使用属性的性能开销 Performance overhead of using attributes in .NET(在 .NET 中使用属性的性能开销) 从 DTE 访问属性信息 Accessing attribute info from DTE(从 DTE 访问属性信息) c#使用数据源隐藏datagridview中的属性 c# Hide a property in datagridview with datasource(c#使用数据源隐藏datagridview中的属性) 从 HTML 帮助器中提取显示名称和描述属性 Extract Display name and description Attribute from within a HTML helper(从 HTML 帮助器中提取显示名称和描述属性) C# 属性及其用途 C# Attributes and their uses(C# 属性及其用途) C# - 按属性获取所有枚举值 C# - Getting all enums value by attribute(C# - 按属性获取所有枚举值)
                  <legend id='NWyAZ'><style id='NWyAZ'><dir id='NWyAZ'><q id='NWyAZ'></q></dir></style></legend><i id='NWyAZ'><tr id='NWyAZ'><dt id='NWyAZ'><q id='NWyAZ'><span id='NWyAZ'><b id='NWyAZ'><form id='NWyAZ'><ins id='NWyAZ'></ins><ul id='NWyAZ'></ul><sub id='NWyAZ'></sub></form><legend id='NWyAZ'></legend><bdo id='NWyAZ'><pre id='NWyAZ'><center id='NWyAZ'></center></pre></bdo></b><th id='NWyAZ'></th></span></q></dt></tr></i><div id='NWyAZ'><tfoot id='NWyAZ'></tfoot><dl id='NWyAZ'><fieldset id='NWyAZ'></fieldset></dl></div><tfoot id='NWyAZ'></tfoot><tbody id='NWyAZ'></tbody><q id='NWyAZ'></q><small id='NWyAZ'><b id='NWyAZ'></b><style id='NWyAZ'></style><i id='NWyAZ'></i><small id='NWyAZ'><dl id='NWyAZ'></dl><fieldset id='NWyAZ'><form id='NWyAZ'><dt id='NWyAZ'><code id='NWyAZ'></code><code id='NWyAZ'><div id='NWyAZ'></div></code></dt></form></fieldset></small></small><thead id='NWyAZ'><kbd id='NWyAZ'></kbd><sup id='NWyAZ'><th id='NWyAZ'></th></sup></thead><sup id='NWyAZ'><strong id='NWyAZ'><i id='NWyAZ'></i></strong><small id='NWyAZ'><div id='NWyAZ'></div></small><ins id='NWyAZ'></ins></sup><legend id='NWyAZ'><table id='NWyAZ'></table></legend><bdo id='NWyAZ'></bdo><ul id='NWyAZ'></ul><strong id='NWyAZ'><tr id='NWyAZ'></tr></strong><label id='NWyAZ'></label><strike id='NWyAZ'></strike><option id='NWyAZ'><u id='NWyAZ'><ol id='NWyAZ'><blockquote id='NWyAZ'></blockquote></ol></u></option><table id='NWyAZ'></table><small id='NWyAZ'></small><noframes id='NWyAZ'> 栏目导航 前端开发问题Java开发问题C/C++开发问题Python开发问题C#/.NET开发问题php开发问题移动开发问题数据库问题 最新文章 • 承载错误 - invalid_token - 未找到... • 将 SQL Server varBinary 数据转换为... • Linq - 在多个 (OR) 条件下进行左连... • ASP.NET Core 5.0 JWT 身份验证总是... • 使用 System.IdentityModel.Tokens.J... • System.DirectoryServices - 服务器... • xml 文档异常中禁止的 DTD... • LINQ 左连接和右连接... • Excel 错误 HRESULT: 0x800A03EC 尝... • 如何在 .net 中将 pdf 转换为位图图... • 如何在 C# Windows 窗体应用程序中激... • 如何使用 C# 以编程方式编辑 Power B... 热门文章 • 承载错误 - invalid_token - 未找到... • 将 SQL Server varBinary 数据转换为... • Linq - 在多个 (OR) 条件下进行左连... • ASP.NET Core 5.0 JWT 身份验证总是... • 使用 System.IdentityModel.Tokens.J... • System.DirectoryServices - 服务器... • xml 文档异常中禁止的 DTD... • LINQ 左连接和右连接... • Excel 错误 HRESULT: 0x800A03EC 尝... • 如何在 .net 中将 pdf 转换为位图图... • 如何在 C# Windows 窗体应用程序中激... • 如何使用 C# 以编程方式编辑 Power B... 热门标签 五金机械 教育培训 机械设备 环保公司 新闻资讯 服装服饰 营销型 轴承 电子元件 零部件 电子科技 电子产品 环保科技 培训机构 电子商城 双语 中英双语 织梦模板 dede 外语学校 竞价网站源码 竞价培训网 门户网站 织梦笑话网 dedecms笑话网 织梦源码 网站建设 搞笑图片 织梦教程 旅游网站源码 织梦旅游网 学校培训 html5 企业织梦源码 医院源码 后台样式 移动营销页 chatgpt 整形医院 大学医院 新手建站 客服代码 洗衣机维修 企业网站 淘宝客 导航菜单 教育网站 学校源码 装修网站 装修模板 美容整形 女性健康 妈妈网 机械源码 建站公司 珠宝首饰 苹果网站 手机资讯 管理平台 织梦模版打包 妇科源码 安卓市场源码 男性时尚网 健康之家 app应用网站 笑话网站 下载站 车辆管理系统 中医院网站 家装网站源码
                  网站首页 - 免责声明- 最新公告- 充值相关 - 网站地图 Copyright © 2022-2023 深圳市沃梦达电子商务有限公司 All Rights Reserved. 粤ICP备14083021号