与Crystal Reports相关的问题 [英] Issue related to Crystal Reports

查看:76
本文介绍了与Crystal Reports相关的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..



我目前正在使用asp.net网站(4.0框架)之一使用crytal报告,这只能在托管后localhost不在服务器上。



任何人都可以告诉我wat可能是问题吗?

Hi..

I am currently working with one of the asp.net website(4.0 framework) where am using crytal reports,which is working fine only in localhost not on server after hosting.

Can anyone please let me know wat might be the issue??

推荐答案

参见下面的链接您可能会有所了解

http://www.manjuke.com/2009/07/type-in​​itializer-for-threw-exception.html [ ^ ]



和关于异常



首先要检查的是:



1)架构(x86,x64)

2)Crystal Runtime版本







See Below Link You may get some idea
http://www.manjuke.com/2009/07/type-initializer-for-threw-exception.html[^]

and about the exception

First things to check are:

1) Architecture (x86, x64)
2)Crystal Runtime Version



TypeInitializationException occurs when a static constructor has an error. It is thrown from static constructors. It actually wraps the errors from static constructors. It cannot be trapped outside of the static constructor reliably.
The Below Program Shows How this error will come

using System;

class Program
{
    static Program()
    {
	//
	// Static constructor for the program class.
	// ... Also called a type initializer.
	// ... It throws an exception in runtime.
	//
	int number = 100;
	int denominator = int.Parse("0");
	int result = number / denominator;
	Console.WriteLine(result);
    }

    static void Main()
    {
	// Entry point.
    }
}

Output

Unhandled Exception: System.TypeInitializationException: The type initializer for
'Program' threw an exception. --->
System.DivideByZeroException: Attempted to divide by zero.
   at Program..cctor() in....
   --- End of inner exception stack trace ---
   at Program.Main()


System.IO.FileLoadException:无法加载文件或程序集'log4net,Version = 1.2.10.0,Culture =中性,PublicKeyToken = 692fbea5521e1304'或其依赖项之一。定位程序集的清单定义与程序集引用不匹配

上述错误仅表示:您正在使用Log4Net来记录服务器上缺少的错误。



确保服务器上存在log4Net.dll。程序集的版本应与项目中引用的版本相同。即使汇编版本不匹配也会引发错误。

安装它或将dll放在应用程序的bin文件夹中。
System.IO.FileLoadException: 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
Above error simply means: You are using Log4Net to log errors which is missing on the server.

Make sure that the log4Net.dll is present on server. Version of assembly should be same as referenced in your project. Even assembly version mismatch will raise error here.
Either install it or put the dll in bin folder of your application.


我必须重新编译我的dll将目标cpu从'any'重新编译为'x86' ,并修复它。
I had to recompile my dll changing target cpu from 'any' to 'x86', and that fixed it.


这篇关于与Crystal Reports相关的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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