在我的本地版本中,当我打开具有水晶报表查看器的页面时 - 一切都加载并且看起来很好(水晶报表查看器实际显示在页面上)。当我把它复制到网络服务器上(并为正确的版本安装CR框架)时 - 水晶报表查看器在打开页面时没有加载,所以我得到一个空白页面,表示没有加载任何内容。还有其他人遇到过这个问题吗?
编辑 - 重启服务器后,我收到以下错误。 - 错误在第24行
当在本地构建上运行仍然有效时,服务器上的代码完全相同,不知道为什么我收到此错误。感谢
Server Error in '/' Application.
--------------------------------------------------------------------------------
Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB- FDAAB610FD1B} failed due to the following error: 8007007e The specified module could not be found. (Exception from HRESULT: 0x8007007E).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error: 8007007e The specified module could not be found. (Exception from HRESULT: 0x8007007E).
Source Error:
Line 22: ReportSourceID="McNeil_source" ToolbarImagesFolderUrl="" ToolPanelWidth="200px"
Line 23: Width="2304px" HasRefreshButton="True"></CR:CrystalReportViewer>
Line 24: <CR:CrystalReportSource ID="McNeil_source" runat="server">
Line 25: <Report FileName="CrystalReport2.rpt">
Line 26: </Report>
Source File: C:\Program Files (x86)\CruiseControl.NET\server\iPlan 7 Layer QA\WorkingDirectory\excel import.aspx Line: 24
这是堆栈跟踪
[FileNotFoundException: Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error: 8007007e The specified module could not be found. (Exception from HRESULT: 0x8007007E).]
CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() +193
[TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.]
CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() +44
CrystalDecisions.ReportSource.CachedReport.get_ReportDocument() +39
CrystalDecisions.Web.CrystalReportSource.set_Report(Report value) +218
ASP.excel_import_aspx.__BuildControlMcNeil_source() in C:\Program Files (x86)\CruiseControl.NET\server\iPlan 7 Layer QA\WorkingDirectory\excel import.aspx:24
ASP.excel_import_aspx.__BuildControlform1() in C:\Program Files (x86)\CruiseControl.NET\server\iPlan 7 Layer QA\WorkingDirectory\excel import.aspx:16
ASP.excel_import_aspx.__BuildControlTree(excel_import_aspx __ctrl) in C:\Program Files (x86)\CruiseControl.NET\server\iPlan 7 Layer QA\WorkingDirectory\excel import.aspx:1
ASP.excel_import_aspx.FrameworkInitialize() +46
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +54
System.Web.UI.Page.ProcessRequest() +78
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.excel_import_aspx.ProcessRequest(HttpContext context) +37
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
我删除了32位版本,安装了64并得到了一个新错误,这里是
Server Error in '/' Application.
--------------------------------------------------------------------------------
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)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: 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. (Exception from HRESULT: 0x80131040)
Source Error:
Line 18:
Line 19: </div>
Line 20: <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
Line 21: AutoDataBind="True" GroupTreeImagesFolderUrl="" Height="962px"
Line 22: ReportSourceID="McNeil_source" ToolbarImagesFolderUrl="" ToolPanelWidth="200px"
Source File: C:\Program Files (x86)\CruiseControl.NET\server\iPlan 7 Layer QA\WorkingDirectory\excel import.aspx Line: 20
Stack Trace:
[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. (Exception from HRESULT: 0x80131040)]
CrystalDecisions.Web.CrystalReportViewer..cctor() +0
[TypeInitializationException: The type initializer for 'CrystalDecisions.Web.CrystalReportViewer' threw an exception.]
CrystalDecisions.Web.CrystalReportViewer..ctor() +19
ASP.excel_import_aspx.__BuildControlCrystalReportViewer1() in C:\Program Files (x86)\CruiseControl.NET\server\iPlan 7 Layer QA\WorkingDirectory\excel import.aspx:20
ASP.excel_import_aspx.__BuildControlform1() in C:\Program Files (x86)\CruiseControl.NET\server\iPlan 7 Layer QA\WorkingDirectory\excel import.aspx:16
ASP.excel_import_aspx.__BuildControlTree(excel_import_aspx __ctrl) in C:\Program Files (x86)\CruiseControl.NET\server\iPlan 7 Layer QA\WorkingDirectory\excel import.aspx:1
ASP.excel_import_aspx.FrameworkInitialize() +46
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +54
System.Web.UI.Page.ProcessRequest() +78
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.excel_import_aspx.ProcessRequest(HttpContext context) +37
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
我也在网站上的其他页面中收到此错误
2>'/'应用程序中的服务器错误。配置错误 描述:处理为此请求提供服务所需的配置文件时发生错误。请查看下面的具体错误详细信息并相应地修改配置文件。
Parser Error Message: Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 34: debugging ASP.NET files.
Line 35: -->
Line 36: <compilation defaultLanguage="vb" debug="true" targetFramework="4.0"> <assemblies><add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies></compilation>
Line 37: <!-- CUSTOM ERROR MESSAGES
Line 38: Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
Source File: C:\Program Files (x86)\CruiseControl.NET\server\iPlan 7 Layer QA\WorkingDirectory\web.config Line: 36
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
答案 0 :(得分:2)
这在Crystal Reports .net部署中很常见。开发机器和生产服务器之间往往存在差异(有时是微妙的)。
首先要检查的是:
如果这些不匹配,您将遇到问题:)
答案 1 :(得分:2)
我有同样的问题并且'能够解决它。这是我做的解决方案:
每个Crystal Reports的一些部署说明:
一个。从以下URL下载并安装Crystal Reports: http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_64bit_13_0_1.zip
B中。请执行以下操作以在IIS中更新您的Web应用程序/站点,以便Crystal Report查看器可以正常工作:
Crystal Reports可再发行组件包正在不同于Visual Studio 2010的位置安装报表视图文件 因此,Crystal Report控件期望它不会呈现报表。 我在查看HTML输出时看到了这个问题,并尝试复制控件所期望的“查看器”文件。 完成后,它开始工作。
从此安装位置复制“crystal report viewer”文件: C:\ Program Files(x86)\ SAP BusinessObjects \ Crystal Reports for .NET Framework 4.0 \ Common \ Crystal Reports 2011 \ crystalreportviewers 在此文件夹中: \ aspnet_client \ system_web \ 4_0_30319 \ crystalreportviewers13 (在我们的qa2服务器中,文件夹是:D:\ websites \ qa2-internal.credomobile.com \ aspnet_client \ system_web \ 4_0_30319 \ crystalreportviewers13)
答案 2 :(得分:0)
无法加载文件或程序集'log4net ...
至少64位版本是堆栈跟踪中的问题。在服务器上安装log4net。