locked
The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception RRS feed

  • Question

  • User-266384460 posted

    Hi,

     I have developed a webapplication using vs2010 .net framwork 4.0 on on window 7 (32 bit operatin system).

    I am using  Dim rd ReportDocument = New ReportDocument for a crystal report.

    I works fine on the local machine(window 7 - 32 bit operatin system ) where I am developing the application. But when I deploy it on IIS7 it throws an error "The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception" at "Dim rd ReportDocument = New ReportDocument"

    The production server where i deployed the application is WOndows Server 2008 R2 enterpise (64-bit operating system).I already have installed Crystal Reports basic Runtime for Visual Studio 2008(x64) on the server.

    There are other webapplications which was deployed on the same server in IIS7  uses same code (Dim rd ReportDocument = New ReportDocument ) for crystal.They work fine.

    Can anybody tell me what can be the reasons it is throwing this error only with one web application

    Thursday, October 6, 2011 9:03 PM

Answers

  • User-1672167363 posted

    Hi,

    When your generating the Reports where are they stored and being viewed from ?

    Your Reports Application are the folders located inside IIS Server or as a Directory

           outside IIS Server ?

    You may have issues with permissions

      http://learn.iis.net/page.aspx/150/understanding-sites-applications-and-virtual-directories-on-iis-7-and-above/ .

    It would help to know if you have looked at the other suggestions.

    Martin

     

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, October 13, 2011 5:13 AM
  • User-266384460 posted

    Hi there,

     I fixed this issue by setting "Enable 32-Bit Application" to False in Application pool's advanced setting.

    I don't know why it fixed the error.. But it worked fine after I set it to False.

     

    Thanks

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Tuesday, October 25, 2011 7:33 PM

All replies