Skip to Content
avatar image
Former Member

Log4net error with Windows server 2012

Good Morning,

I have been struggling with this error for over a week now with no solution.

I deployed my web application on a windows server 2012, on my PC the solution is working perfectly, however when i deployed in on windows server 2012 and trying to load a crystal report i got this error:

Server Error in '/' Application.

--------------------------------------------------------------------------------

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.

  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.IO.FileNotFoundException: 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.

Source Error:

Line 13: <body>

Line 14:     <form id="form1" runat="server">   

Line 15:     <CR:CrystalReportViewer  ID="ReportViewer1" runat="server" AutoDataBind="true"

Line 16:             HasToggleGroupTreeButton="False" HasToggleParameterPanelButton="False"

Line 17:             HasCrystalLogo="False" HasDrilldownTabs="False" HasDrillUpButton="False"

 

Source File:  c:\inetpub\wwwroot\InsuranceWebUI\Views\Reporting\CRreportViewer.aspx    Line:  15

Assembly Load Trace: The following information can be helpful to determine why the assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' 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].

 

Stack Trace:

[FileNotFoundException: 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.]

   CrystalDecisions.Web.CrystalReportViewer..cctor() +0

[TypeInitializationException: The type initializer for 'CrystalDecisions.Web.CrystalReportViewer' threw an exception.]

   CrystalDecisions.Web.CrystalReportViewer..ctor() +0

   ASP.views_reporting_crreportviewer_aspx.__BuildControlReportViewer1() in c:\inetpub\wwwroot\InsuranceWebUI\Views\Reporting\CRreportViewer.aspx:15

   ASP.views_reporting_crreportviewer_aspx.__BuildControlform1() in c:\inetpub\wwwroot\InsuranceWebUI\Views\Reporting\CRreportViewer.aspx:14

   ASP.views_reporting_crreportviewer_aspx.__BuildControlTree(views_reporting_crreportviewer_aspx __ctrl) in c:\inetpub\wwwroot\InsuranceWebUI\Views\Reporting\CRreportViewer.aspx:1

   ASP.views_reporting_crreportviewer_aspx.FrameworkInitialize() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\c2714612\dec89504\App_Web_fflp1qfi.5.cs:0

   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +48

   System.Web.UI.Page.ProcessRequest() +72

   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21

   System.Web.UI.Page.ProcessRequest(HttpContext context) +58

   ASP.views_reporting_crreportviewer_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\c2714612\dec89504\App_Web_fflp1qfi.5.cs:0

   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341

   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

i have tried several solutions mentionned in SAP community network and nothing worked for me.

1- I tried moving crystalreportsviewer13 to my directory

2- i tried installing several versions of CRuntime_64bits

3- i tried to add in my web.config

<crystalReportViewer>

              <add key="ResourceUri" value="~/crystalreportviewers13" />

        </crystalReportViewer>

and nothing have worked for me.

I will really appreciate if anyone could help me, it has taken lot of my time.

Thank you in advance.

Regards,

Ronald

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 14, 2014 at 04:18 PM

    Hi Ronald

    Recompile the app as either 32 or 64 bit - not Any CPU. Redeploy, see if that helped. This is assuming you are using SP 11 for SAP Crystal Reports, Developer Version for Visual Studio .NET. If not, update both your dev computer and runtime to SP 11:

    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates &amp; Runtime Downloads

    There is also a fair number of KBAs, etc., on the issue. Use a simple search term like 'crystal net log4net' in the search box - top right corner.

    - Ludek

    Senior Support Engineer AGS Product Support, Global Support Center Canada

    Follow us on Twitter

    Add comment
    10|10000 characters needed characters exceeded