[英]Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies
I am getting this error since last 2 days in my Server where i had hosted application.自过去 2 天以来,我在托管应用程序的服务器中收到此错误。 I had already tried most of the scenario mentioned here.
我已经尝试过这里提到的大部分场景。 but not getting anything.
但没有得到任何东西。
Here is my stack trace -这是我的堆栈跟踪 -
[FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. [FileNotFoundException:无法加载文件或程序集“log4net,版本=1.2.10.0,文化=中性,PublicKeyToken=692fbea5521e1304”或其依赖项之一。 The system cannot find the file specified.]
该系统找不到指定的文件。]
CrystalDecisions.Shared.SharedUtils..cctor() +0CrystalDecisions.Shared.SharedUtils..cctor() +0
[TypeInitializationException: The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception.] [TypeInitializationException:'CrystalDecisions.Shared.SharedUtils' 的类型初始化程序引发了异常。]
CrystalDecisions.Shared.SharedUtils.get_CurrentControl() +18CrystalDecisions.Shared.SharedUtils.get_CurrentControl() +18
CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture() +8CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture() +8
CrystalDecisions.CrystalReports.Engine.CREngineRes.GetString(String name) +11CrystalDecisions.CrystalReports.Engine.CREngineRes.GetString(字符串名称)+11
CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime() +143 CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() +131CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime() +143 CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() +131
[TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.] [TypeInitializationException:'CrystalDecisions.CrystalReports.Engine.ReportDocument' 的类型初始化程序引发了异常。]
CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() +0CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() +0
AdminReports..ctor() +25 ASP.reportviewer_aspx..ctor() +14AdminReports..ctor() +25 ASP.reportviewer_aspx..ctor() +14
__ASP.FastObjectFactory_app_web_reportviewer_aspx_cdcab7d2.Create_ASP_reportviewer_aspx() +20 System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +109__ASP.FastObjectFactory_app_web_reportviewer_aspx_cdcab7d2.Create_ASP_reportviewer_aspx() +20 System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +109
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +334 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +334 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
Version Information: Microsoft .NET Framework Version:4.0.30319;版本信息:Microsoft .NET Framework 版本:4.0.30319; ASP.NET Version:4.0.30319.1
ASP.NET 版本:4.0.30319.1
<\/blockquote>
Already configured my IIS to allow applications to run on 32bit.已经将我的 IIS 配置为允许应用程序在 32 位上运行。
"
I have had this issue, and what fixed it for me was going to the program properties (under Project -> "Program Name" Properties) and then under the publish area, find the Application Files, and find the Log4net.dll.我遇到了这个问题,对我来说修复它的是转到程序属性(在项目->“程序名称”属性下),然后在发布区域下,找到应用程序文件,然后找到 Log4net.dll。
This was set to "Include(Auto)" for me, but that did not actually include it in the Program.这对我来说设置为“包含(自动)”,但实际上并没有将它包含在程序中。 when i set this to "Include" That fixed that issue for me.
当我将其设置为“包含”时,这为我解决了该问题。
You are missing the log4net.dll or have a different version than Version=1.2.10.0 in your bin directory.您缺少 log4net.dll 或 bin 目录中的版本与 Version=1.2.10.0 不同。 Make sure you package the right log4net.dll (version).
确保您打包了正确的 log4net.dll(版本)。 Or if you have multiple versions in your project you can try to rebind the versions.
或者,如果您的项目中有多个版本,您可以尝试重新绑定这些版本。
For me the log4net file was there and version correct but the problem was missing runtime.对我来说,log4net 文件在那里并且版本正确,但问题是缺少运行时。 Downloaded it here: https:\/\/www.tektutorialshub.com\/crystal-reports\/how-to-download-and-install-crystal-report-runtime\/<\/a>
在此处下载:
https<\/a> :\/\/www.tektutorialshub.com\/crystal-reports\/how-to-download-and-install-crystal-report-runtime\/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.