Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
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.


the above mentioned error occurred when I am accessing asp.net application which is deployed on IIS server ,which is Using Crystal report concept,
need help regarding mentioned issue
Thanks In advance
Posted

1 solution

It seems that one of the projects in your solution or maybe some 3rd party dll has been built with different version of log4net. Either you update references to log4net in all projects or you could add assembly redirection setting to the web.config
Put below tags in Web.config, anywhere under configuration element.
HTML
<runtime>
    <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentassembly>
            <assemblyidentity name="log4net">
                          publicKeyToken="1b44e1d426115821"
                          culture="neutral" />
            <bindingredirect oldversion="1.2.10.0">
                         newVersion="1.2.13.0"/>
        </bindingredirect></assemblyidentity></dependentassembly>
    </assemblybinding>
</runtime>
 
Share this answer
 
Comments
Madhav Gunjal 2-Jan-16 4:33am    
I tried ur cinfig code but its not working
koolprasad2003 2-Jan-16 4:49am    
Are you using IIS 7 version
Madhav Gunjal 2-Jan-16 5:02am    
no its 8.5,and OS is windows8
koolprasad2003 2-Jan-16 5:05am    
OK. Then I think you have not enabled 32Bit application in your application pool.
do the following steps
Open IIS
Go to current server – > Application Pools
Select the application pool your 32-bit application will run under
Click Advanced setting or Application Pool Default
Set Enable 32-bit Applications to True
Restart IIS and try again

If this option is not available to you, follow these next steps:
Go to %windir%\system32\inetsrv\
Execute the appcmd.exe tool:

Madhav Gunjal 2-Jan-16 5:13am    
yes sir,i tried this one also but its keep showing same error

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