cancel
Showing results for 
Search instead for 
Did you mean: 

VS2005 and CR 2008 (V12) and Windows Server 2008 R2 x64 Issue

Former Member
0 Kudos

We have VS2005 web application on .Net 2.0 running fine with CR 2008 v12 runtime (CRRuntime_12_3_mlb) on BOTH a) .Net 2.0, IIS6, Win XP and b) .Net 2.0, IIS7, Windows Server 2008 32-bit edition. The reason we have chosen CR 2008 v12  (against integrated VS2005 CR 10.2) is its ability to allow dynamically load images in reports (we have reached this level after a lot of pain) and it works great too.

However switching from Windows 2003 server to Windows 2008 R2 x64 Server give crystal report problem -  Deploying website on .Net 2.0 framework Windows Server 2008 R2 (64 bit) using IIS7 and installing CRRuntime_12_3_mlb (installed fine) and then running report, it gives this error 'The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception'. Application Pools are set for .Net 2.0 and Enable 32-bit Application as True. Not sure what we are missing.

I read many posting and have summary of questions:

1) Does CR 2008 v12 Runtime SP3 or even SP5 not support x64 OS like Windows Server 2008 R2?

2) Do we need to deploy our web application in x86 mode instead of 'Any CPU'? [We could not find x86 explicit mode choice for Project_deploy in VS2005 but added x86 for Release in project file and are able to create deployment files but need to test online - I am crossing my fingers to see what results we will get.]

3) I read in some threads a suggestion of moving to VS2010 with .Net 4.0 and using Integrated 10.5 version and using CRRuntime_64bit_13_0_2.msi to deply on Windows Server 2008 R2 64bit. I do not know if this is a downgrade for crystal report from 2008 v12 to 10.5 or upgrade from 2008 v12 to runtime v13 just because we want reports to run on Windows Server 2008 R2! We can take risk of moving from CR 2008 v12 to Integrated 10.5 from VS2005 to VS2010 but not sure if

a) it retains our ability to dynamically load images in reports AS WELL AS

b) supports runtime reports on 64bit Windows Server 2008 R2?

If anyone can help us solve and run crystal report on Windows Server 2008 R2 64bit, it would be great?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

1) Does CR 2008 v12 Runtime SP3 or even SP5 not support x64 OS like Windows Server 2008 R2?

Yes - in 32 bit mode, 32 bit app pool, 32 bit DB drivers, etc.

2) Do we need to deploy our web application in x86 mode instead of 'Any CPU'? [We could not find x86 explicit mode choice for Project_deploy in VS2005 but added x86 for Release in project file and are able to create deployment files but need to test online - I am crossing my fingers to see what results we will get.]

- You must compile as x86. You can not compile as "Any CPU" since on a 64 bit OS, the app will try to load 64 bit runtime by definition. Since CR 2008 does not have 64 bit runtime, this will fail.

3) I read in some threads a suggestion of moving to VS2010 with .Net 4.0 and using Integrated 10.5 version and using CRRuntime_64bit_13_0_2.msi to deply on Windows Server 2008 R2 64bit. I do not know if this is a downgrade for crystal report from 2008 v12 to 10.5 or upgrade from 2008 v12 to runtime v13 just because we want reports to run on Windows Server 2008 R2! We can take risk of moving from CR 2008 v12 to Integrated 10.5 from VS2005 to VS2010 but not sure if

- For VS 2010, you must use Crystal Reports for Visual Studio 2010 (CRVS2010). A free download is available from here.

a) it retains our ability to dynamically load images in reports AS WELL AS

- Yes. CRVS2010 is just as functional as CR 2008

b) supports runtime reports on 64bit Windows Server 2008 R2?

- Yes. See the wiki Crystal Reports v. 9.1 to CRVS2010 Runtime Distribution & Supported Operating

- Ludek

Former Member
0 Kudos

Thanks for sharing details. We took up the risk and upgraded our website project to VS2010.

Development

Win XP/SP2, From VS2005->VS2010 Prof + CR for VS2010. On local machine we published the site on .net 4.0,Target = Any CPU and works without issue.

We used the same published version assuming ANY CPU target will force 64bit runtimes. On webshots's Intel L5630 processor Windows Server 2008 R2 Standard 64bit version, installed runtime CRRuntime_64bit_13_0_2 msi and placed published version of the website. With great effort, we passed thru .net 2.0 to .Net 4.0 hurdle. Created new application Pool with .Net 4.0 version, Integrated Mode and Enable 32-mode application = True and Identity as Network Service. Now running aspx page for crystal report gave this error.

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.

Stack Trace

[FileNotFoundException: 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.]

   CrystalDecisions.Web.CrystalReportViewer..cctor() +0

[TypeInitializationException: The type initializer for 'CrystalDecisions.Web.CrystalReportViewer' threw an exception.]

   CrystalDecisions.Web.CrystalReportViewer..ctor() +19

   ASP.usercontrolreport_ascx.__BuildControlViewer1() +26

   ASP.usercontrolreport_ascx.__BuildControlTree(usercontrolreport_ascx __ctrl) +637

   ASP.usercontrolreport_ascx.FrameworkInitialize() +37

   System.Web.UI.UserControl.InitializeAsUserControlInternal() +35

   ASP.reports_controls_buyorsellreporting_aspx.__BuildControlUserControl1() +62

   ASP.reports_controls_buyorsellreporting_aspx.__BuildControlform1() +133

   ASP.reports_controls_buyorsellreporting_aspx.__BuildControlTree(reports_controls_buyorsellreporting_aspx __ctrl) +189

   ASP.reports_controls_buyorsellreporting_aspx.FrameworkInitialize() +29

   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.reports_controls_buyorsellreporting_aspx.ProcessRequest(HttpContext context) +4

   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100

   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Interesting log4net facts

1) Our development environment only has log4net.dll 1.2.9.0 versions.

2) Runtime installation of CRRuntime_64bit_13_0_2 has not copied any log4net.dll file on webserver!

Not sure why it even looks for log4net. So, we downloaded v 1.2.10.0 of log4net and placed in website's bin directory. But now, it gave me the error once 'Object reference not found' and all other attempts gave  'CrystalDecisions.CrystalReports.Engine.ReportDocument threw an exception' error. We are back to square one now.

We tried finding Property pages in Website development, some 4 CrystalDecisions dlls are referenced carried from CR 2008 v12. And could not find any reference of log4net.dll at all!

What options do we have? Please help.

former_member183750
Active Contributor
0 Kudos

I am having problems with he following statement:

We used the same published version assuming ANY CPU target will force 64bit runtimes. On webshots's Intel L5630 processor Windows Server 2008 R2 Standard 64bit version, installed runtime CRRuntime_64bit_13_0_2 msi and placed published version of the website. With great effort, we passed thru .net 2.0 to .Net 4.0 hurdle. Created new application Pool with .Net 4.0 version, Integrated Mode and Enable 32-mode application = True and Identity as Network Service.

As I read it, you installed 64 bit CR runtime (CRRuntime_64bit_13_0_2 msi) and then you set the app to use 32 bit runtime (Enable 32-mode application = True). So, the question then becomes; do you want your app to use 32 bit or 64 bit runtime? If you Enable 32-mode application = True, then you need to install the 32 bit runtime, irrespective of the OS. If you want the app to run as 64 bit don't use Enable 32-mode application = True.

- Ludek

Former Member
0 Kudos

Thanks Ludek and great observation. FYI - We installed 64 bit CR runtime on web server. Now setting Enable 32-bit to false, guess what - it started working - how great it feels to receive your help.

This very interactive forum is so helpful and I feel obliged to deliver our learnings to others.

Few observations for benefit of readers I want to pass on regarding our learning with CR,

1) We created application pool .net = 4.0, Managed Pipeline = Integrated and Identity = NetworkService and used this AppPool for our web application which creates CR.

2) After making necessary changes to web.config, you may need to go to 'HTTP Mappings'. This is the most difficult step to understand and apply. Under IIS 7.x, go to your site, double click HTTP Mappings on your right pan. On further right, click on 'Revert to Parent'. Many times on dedicated servers when your hosted sites are created and added, many HTTP mappings are missing and they are only visible under Default Web Site. What this 'revert to parent' does is bring and apply all those necessary HTTP mappings for your site. This saves you hours of debugging and facing those 404.17 and 500.xx screens.

2) Windows\Temp directory must be given sufficient rights to Network Service, IIS_USRS etc.

3) When you see blank display, you may need to copy aspnet_client folder to your web application folder since CR runtime installs some dlls, javascripts and images that get called during report viewing.

Good luck to all!

Answers (0)