Last post Jun 21, 2013 05:46 AM by Khamis Diab
Sep 04, 2012 04:05 PM|snailpace|LINK
I am using Visual Studio 2010 and the reports run fine on my local machine but when i deploy my web application on the server, i get the log4net error.
can anyone help me out with what i am missing?
the error is as below
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=18.104.22.168, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
Line 15: <form id="form1" runat="server">
Line 16: <div>
Line 17: <CR:CrystalReportViewer ID="viewSheet" runat="server" Line 18: AutoDataBind="true" EnableDatabaseLogonPrompt="False"
Line 19: EnableParameterPrompt="False" ReuseParameterValuesOnRefresh="True"
Sep 05, 2012 07:15 AM|Ajay2707|LINK
This show that there is conflict of version between your crystal report file referencece given in config and the actual file on that location. It will be mismatched.
And install or give proper reference in config.
Sep 05, 2012 09:08 AM|snailpace|LINK
Thanks for replying.
I am actually using the correct reference in web.config. I can view the reports correctly on my local machine. But on the IIS server the reports dont show up, i keep getting the log4net.dll error.
Any help please?
Sep 05, 2012 09:15 AM|Ajay2707|LINK
see this link.
Sep 05, 2012 10:46 AM|snailpace|LINK
i checked the links nad i think i found the problem. In my Gac folder i have the log4net dll and this was actually installed by some other program and i dont know which one. i tried to uninstall it, but i could not since the message says some other program
is using it.
How do i check to see if Crystal reports in the web applications is infact referencing to the correct dlls and not the log4net as above?
Sep 06, 2012 12:28 AM|Ajay2707|LINK
you can check with your local machine crystal report's path, means open solution explorer and select crystal report file in bin folder or in ref .
Then f4 , so it gives path. after you getting perfect file name. just remove and again add in local. Now the same file you can only add at deploy and check the problem is solved.
if not solved, then second option, just copy dll of your local machine and paste in your bin folder in local. then give rebuild. and again then dll and web.conig deploy in server.
Sep 06, 2012 09:41 AM|snailpace|LINK
i did check the version and path on the solution explorer, everything seems to work perfectly on my local machine. when i deploy on the server, i keep getting the log4net error. i have no idea why is the application looking for the log4net dll. do you have
any idea why this might be happening?
Sep 07, 2012 12:29 AM|Ajay2707|LINK
Are you read above comment?. please read.
you just copy crystal report dll ,paste in bin , then again build and deploy only web.config and crstyal report.dll(paste in bin folder).
What happen I explain, When you give reference,dll path will taken from default location i.e. where software installed. at deploye on the same location if file not exist, it give reference problem.
So for this you can give local reference of crystalreport by paste in bin folder. It works as your other project reference if you made like for DAL layer or Business Access Layer.
Sep 12, 2012 10:00 AM|snailpace|LINK
i had to download the correct CR runtime installation package to remove the log4net error.
Mar 25, 2013 02:58 AM|ashy4081|LINK
is your report working fine now snail...if yes then plz tell me bcz i am getting the same problem, Thanks
Jun 21, 2013 05:46 AM|Khamis Diab|LINK
I got the same problem by installing the 32bit CR redistributable package on 64bit systems. Once I installed the 64bit CR redist package the problem was gone.