将ASP.net应用程序部署到iis时出现问题 [英] problem while deploying ASP.net Application to iis

查看:61
本文介绍了将ASP.net应用程序部署到iis时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法加载文件或程序集 '  log4net,Version = 1.2.10.0,Culture = neutral,PublicKeyToken = 692fbea5521e1304'或其中一个依赖项。系统无法找到指定的文件。





当我访问部署在IIS服务器上的asp.net应用程序时出现上述错误,这是使用Crystal报告概念,

需要有关上述问题的帮助

在此先感谢

解决方案

它似乎您的解决方案中的一个项目或者某些第三方DLL已经使用不同版本的log4net构建。您可以在所有项目中更新对log4net的引用,或者您可以将程序集重定向设置添加到web.config

在Web.config中放置以下标签,在配置元素下的任何位置。

 <   runtime  > ;  
< assemblybinding xmlns = urn:schemas-microsoft -com:asm.v1 >
< dependentassembly >
< assemblyidentity na我 = log4net >
publicKeyToken =1b44e1d426115821
culture =neutral/>
< bindingredirect < span class =code-attribute> oldversion = 1.2.10.0 >
newVersion =1.2.13.0/>
< / bindingredirect > < / assemblyidentity > < / dependentassembly >
< / assemblybinding >
< / runtime >


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

解决方案

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.

<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>


这篇关于将ASP.net应用程序部署到iis时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆