Solved

Crystal ASP.NET Fails on Windows Server 2003

Posted on 2004-04-01
11
1,317 Views
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!

Thanks,
Sandie
0
Comment
Question by:SandieT04
11 Comments
 
LVL 7

Accepted Solution

by:
ladylinet earned 500 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
0
 

Author Comment

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

ASP.NET 1.1

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?
0
 
LVL 100

Expert Comment

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

Start here
http://support.businessobjects.com/fix/hot/mhf/default.asp?ref=search_default.asp

mlmcc

0
 

Author Comment

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

Author Comment

by:SandieT04
ID: 10735162
We applied the Hotfix and it made no difference at all :-(
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:SandieT04
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.

0
 

Author Comment

by:SandieT04
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.
0
 
LVL 7

Expert Comment

by:ladylinet
ID: 10737280
1) Take a look at this article:
http://support.businessobjects.com/library/kbase/articles/c2013308.asp
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.

0
 
LVL 4

Expert Comment

by:kssaran
ID: 10738483
FYKI,

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
            myTable.ApplyLogOnInfo(myLogonInfo)
        Next
    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, _
                        CrystalDecisions.CrystalReports.Engine.SubreportObject)

                    '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
            Next
        Next
0
 

Author Comment

by:SandieT04
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.

Sandie
0
 
LVL 4

Expert Comment

by:Sandeepk1999
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...
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now