如何在服务器机器中使用主机的水晶报告时解决log4net加载程序集? [英] How to solve log4net load assembly when using crystal report for host in server machine ?

查看:55
本文介绍了如何在服务器机器中使用主机的水晶报告时解决log4net加载程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




i开发网站使用水晶报告版本是13.0.2000.0



我的开发机器规格是



Windows 7 32位

Crystal Report exe 已安装(V13.0.2 ...)

.net框架是4.0

如果我在C:\ Windows \ assembly中搜索log4net并找到log4net程序集名称和进程Arc是X86。

And在开发机器报告工作正常没问题



但是,当我在服务器机器中部署时,我收到错误,如

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





服务器机器规格是



Server 2012 64位

i安装相同版本的水晶报告运行时间 msi

如果我在C:\ Windows \ assembly中搜索log4net并找到log4net程序集名称和进程Arc是AMD64



当我发布时网站我使用AnyCpu作为目标机器,但如果我点击任何报告我将收到错误log4net无法加载文件



请尽快回复我





问候

Aravind

Hi
i am developing website using crystal report version is 13.0.2000.0

My developing machine spec is

Windows 7 32 bit
Crystal Report exe installed(V13.0.2...)
.net framework is 4.0
if i search for log4net in C:\Windows\assembly and find log4net Assembly name and process Arc is X86.
And in developing machine report work fine no problem

But when i deploy in server machine i got error like
"{"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.":"log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"}"


Server machine spec is

Server 2012 64 bit
i install same version crystal report runtime msi
if i search for log4net in C:\Windows\assembly and find log4net Assembly name and process Arc is AMD64

When i publish website i use AnyCpu for target machine,but if i click any report i will get error "log4net Could not load file"

Pls reply me asap


Regards
Aravind

推荐答案

如果您的申请是链接到.Net Framework版本4,写入配置文件的配置部分:

If your application is linked to the .Net Framework version 4, write in the configuration section of the config file:
<startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>



还要确保服务器上有.Net运行时版本2-3.5。


Also make sure that the .Net runtime versions 2-3.5 are available on the server.


这篇关于如何在服务器机器中使用主机的水晶报告时解决log4net加载程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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