Click here to Skip to main content
15,943,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using crystal report and Viewer in my project that works perfectly on local but on server it throws following error:

C#
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. (Exception from HRESULT: 0x80131040) 

I do have log4net v1.2.10.0 file inside bin.

What I have tried:

I tried adding log4net file and installing few other fixes.
Posted
Updated 5-May-23 16:34pm
Comments
Sinisa Hajnal 27-Sep-16 9:15am    
Try installing log4net on the server. Probably just some assembly needing GAC registering.
Dave Kreskowiak 27-Sep-16 12:51pm    
Log4Net should never be registered in the GAC.
Richard Deeming 27-Sep-16 12:30pm    
Sounds like you've got the wrong version of the log4net assembly on the server. Try uploading the same version that you referenced, or adding a <bindingRedirect>[^] to your config file.

You don't have log4net on your server. When you deploy your project to the server, make sure that a log4net dll is there...that is what your error is saying.

Re-reading your question here are some options for you to try:

Crystal Reports error when deployed..Could not load file or assembly 'log4net - Stack Overflow[^]

c# - Server Error- Could not load file or assembly 'log4net, Version=1.2.10.0' - Stack Overflow[^]

crystal reports 2010 - Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' - Stack Overflow[^]
 
Share this answer
 
v3
Comments
Richard Deeming 27-Sep-16 12:32pm    
Actually, the error is saying that the file was found, but it's not the same version of the file that was referenced by the project.
David_Wimbley 27-Sep-16 12:37pm    
Thats what i get for reading to quickly. I've updated with more helpful links.
No log4net dll solves the issue but installing the Crystal Report Runtime is the solution.

I used following link Crystal Report Runtime

Thansk @David
 
Share this answer
 
I solved it this way:

The issue was on IIS in which I set in the Advanced Settings of the AppPool the option "Enable 32 Bit Applications" to False and in that way the Crystal Runtime For 64 Bits worked perfectly without needing to install the 32 bit Runtime, and so on the whole application.

Jorge Cruz Martínez
 
Share this answer
 
I've solved in the following way

- First, look if your application is 32 or 64bits and install Crystal Reports Runtime of 32 or 64 bits accordly.
- After that, go into GAC (C:\Windows\assembly) and look for a folder called GAC_32 or GAC_64 and ensure there's a folder called log4net. If not, you have to look for log4net.dll on internet or another source and put it there.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900