Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Crystal ASP.NET Fails on Windows Server 2003

Posted on 2004-04-01
Medium Priority
Last Modified: 2008-05-04
We have a Crystal report defined in an ASP.NET application.  This web application works fine and displays the report on development machines (Windows XP Pro w/ IIS 5.1) and on a Windows 2000 server (IIS 5.1).  We have an ASPNET SQL user defined on all databases -- identically -- that is being used as the logon for the Crystal engine.  However, when we deploy the exact same code to a Windows 2003 Server machine with IIS 6.0 we get the following error:

Logon failed.
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: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:

[LogOnException: Logon failed.]
   .F(String       , EngineExceptionErrorID 
) +506
   .A(Int16 , Int32 ) +537
   CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext reqContext) +539
   CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext) +189
   CrystalDecisions.Web.ReportAgent.u(Boolean N) +164
   CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +62
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Page.ProcessRequestMain() +1489


We have tried following instructions provided by Business Objects, etc.   But can find no solution to this problem.  Unfortunately this problem is the only problem holding this project up from User Acceptance testing.  Hopefully someone can provide us a solution -- please!

Question by:SandieT04
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

ladylinet earned 1000 total points
ID: 10733889
Did you apply latest hotfix?
 Are you using ASP.NET 1.0 or 1.1?
 Check permissions for ASPNET account, since model changed a lot in 2003.

Lady Linet

Author Comment

ID: 10733936
Hotfix for what?  IIS is up to date.   We have not applied hotfixes to VS.NET or Crystal.


Permissions on IIS 6.0 for ASPNET?   We did give full permission to that user account for the Crystal Web viewer in IIS.  Do you mean something else?
LVL 101

Expert Comment

ID: 10734421
Hot fix or service pack for Crystal.Net

Start here


Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 10734518
Thanks.  We will try that and report back.

Author Comment

ID: 10735162
We applied the Hotfix and it made no difference at all :-(

Author Comment

ID: 10735306
We applied the Hotfix for both developing machine and Win 2003 server. It does not help.

We also tried to use IIS 5.0 Isolated Mode for our Win 2003 Server.


Author Comment

ID: 10735958
One additional piece of information that may or may not be helpful.  We did just upgrade the server from Windows 2000 to 2003.

Expert Comment

ID: 10737280
1) Take a look at this article:
2) Also, maybe this can be helpfull:
 Check the references for the following assemblies:

· CrystalDecisions.CrystalReports.Engine
· CrystalDecisions.Reportsource
· CrystalDecisions.Shared
· CrystalDecisions.Web
· CrystalDecisions.Windows.Forms

If you are using the bundled version of Crystal Reports, then the references should be version 9.1.5000.

If you are using the full version of Crystal Reports 9 (developer edition or higher), then the references should be version 9.2.3300.

 Remove the references with the incorrect version and replace them with the references with the correct version.


Expert Comment

ID: 10738483

This is the the common Issue with the Authentication for the tables used in the Crytal Report. just by passing the connection info in online (like rptInvoice.connect = bla..bla..blaa.. ) will not solve the purpose. You need to pass the connection information to each and every tables in the crystal report like given below. I am sure this could be the cause for the above mentioned error. Try this

    Private Sub LogonToDatabase(ByVal ReportTables As CrystalDecisions.CrystalReports.Engine.Tables, ByVal ServerName As String, ByVal UserId As String, ByVal Password As String)
    ' To Supply Logon Information to each and every Tables used in the Report
        Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
        Dim myConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo()
        Dim myLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo()
        myConnectionInfo.UserID = UserId
        myConnectionInfo.Password = Password
        myConnectionInfo.ServerName = ServerName
        myLogonInfo.ConnectionInfo = myConnectionInfo
        For Each myTable In ReportTables
    End Sub

'For the Above mentioned Function you need to pass the parameter something like. Please note that If you have subreports even that needs to be autenticated seperately

        Dim mySection As CrystalDecisions.CrystalReports.Engine.Section
        Dim myReportObject As CrystalDecisions.CrystalReports.Engine.ReportObject
        Dim mySubReport As CrystalDecisions.CrystalReports.Engine.SubreportObject
        Dim mySubReportDoc As CrystalDecisions.CrystalReports.Engine.ReportDocument

        'Loop through each section of the main report

        For Each mySection In myReport.ReportDefinition.Sections
            'Drill down into the section to see if there are any sub-reports
            For Each myReportObject In mySection.ReportObjects
                If myReportObject.Kind = _
                    CrystalDecisions.[Shared].ReportObjectKind.SubreportObject Then
                    mySubReport = CType(myReportObject, _

                    'Get a reference to the sub-report object
                    'so we can change its properties
                    mySubReportDoc = mySubReport.OpenSubreport(mySubReport.SubreportName)
                    'Set the logon credentials
                    LogonToDatabase(mySubReportDoc.Database.Tables, ServerName, UserId, Password)
                End If

Author Comment

ID: 10740971
We do pass info to every table.  That is not the problem

We think we have narrowed the problem down to something caused by the upgrade from Windows 2000 to Windows 2003.   Here's why:

*  We upgraded that server from 2000 to 2003  (call it SERVER1)
*  The logon exception occurred  running on SERVER1 pointing to DB1
*  We setup an alternate server with a clean install of Windows 2003  ("SERVER2")
*  We deployed to this new server (SERVER2) but still pointing to the same database (DB1) -- the application worked!!!

We do not know why the connectivity between SERVER1 and DB1 is hosed up but we do not believe it is the database (SQL SERVER 2000) -- we truly believe it has something to do with the upgrade to Windows 2003.  

Our course now will be to wipe out SERVER1 and do a clean install of Windows 2003 and try again.

Thanks for everyone's help -- and if anyone knows why this upgrade may have killed the connectivity to SQL Server 2000 (on the same physical machine) -- please let us know.


Expert Comment

ID: 11018282
I have found that even if the field names are wrong (for some reason stored procedures changed) then also you get Logon failed error. This is just to let you guys know that you might want to look in that too...

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question