SandieT04
asked on
Crystal ASP.NET Fails on Windows Server 2003
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.CrystalRe ports.Engi ne.LogOnEx ception: 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.CrystalRe ports.Engi ne.FormatE ngine.GetP age(PageRe questConte xt reqContext) +539
CrystalDecisions.ReportSou rce.LocalR eportSourc eBase.GetP age(PageRe questConte xt pageReqContext) +189
CrystalDecisions.Web.Repor tAgent.u(B oolean N) +164
CrystalDecisions.Web.Cryst alReportVi ewer.OnPre Render(Eve ntArgs e) +108
System.Web.UI.Control.PreR enderRecur siveIntern al() +62
System.Web.UI.Control.PreR enderRecur siveIntern al() +125
System.Web.UI.Control.PreR enderRecur siveIntern al() +125
System.Web.UI.Page.Process RequestMai n() +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
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.CrystalRe
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.CrystalRe
CrystalDecisions.ReportSou
CrystalDecisions.Web.Repor
CrystalDecisions.Web.Cryst
System.Web.UI.Control.PreR
System.Web.UI.Control.PreR
System.Web.UI.Control.PreR
System.Web.UI.Page.Process
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hot fix or service pack for Crystal.Net
Start here
http://support.businessobjects.com/fix/hot/mhf/default.asp?ref=search_default.asp
mlmcc
Start here
http://support.businessobjects.com/fix/hot/mhf/default.asp?ref=search_default.asp
mlmcc
ASKER
Thanks. We will try that and report back.
ASKER
We applied the Hotfix and it made no difference at all :-(
ASKER
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.
We also tried to use IIS 5.0 Isolated Mode for our Win 2003 Server.
ASKER
One additional piece of information that may or may not be helpful. We did just upgrade the server from Windows 2000 to 2003.
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.CrystalRe ports.Engi ne
· CrystalDecisions.Reportsou rce
· CrystalDecisions.Shared
· CrystalDecisions.Web
· CrystalDecisions.Windows.F orms
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.
http://support.businessobjects.com/library/kbase/articles/c2013308.asp
2) Also, maybe this can be helpfull:
Check the references for the following assemblies:
· CrystalDecisions.CrystalRe
· CrystalDecisions.Reportsou
· CrystalDecisions.Shared
· CrystalDecisions.Web
· CrystalDecisions.Windows.F
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.
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.CrystalRe ports.Engi ne.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.CrystalRe ports.Engi ne.Table
Dim myConnectionInfo As New CrystalDecisions.Shared.Co nnectionIn fo()
Dim myLogonInfo As New CrystalDecisions.Shared.Ta bleLogOnIn fo()
myConnectionInfo.UserID = UserId
myConnectionInfo.Password = Password
myConnectionInfo.ServerNam e = ServerName
myLogonInfo.ConnectionInfo = myConnectionInfo
For Each myTable In ReportTables
myTable.ApplyLogOnInfo(myL ogonInfo)
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.CrystalRe ports.Engi ne.Section
Dim myReportObject As CrystalDecisions.CrystalRe ports.Engi ne.ReportO bject
Dim mySubReport As CrystalDecisions.CrystalRe ports.Engi ne.Subrepo rtObject
Dim mySubReportDoc As CrystalDecisions.CrystalRe ports.Engi ne.ReportD ocument
'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]. ReportObje ctKind.Sub reportObje ct Then
mySubReport = CType(myReportObject, _
CrystalDecisions.CrystalRe ports.Engi ne.Subrepo rtObject)
'Get a reference to the sub-report object
'so we can change its properties
mySubReportDoc = mySubReport.OpenSubreport( mySubRepor t.Subrepor tName)
'Set the logon credentials
LogonToDatabase(mySubRepor tDoc.Datab ase.Tables , ServerName, UserId, Password)
End If
Next
Next
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.CrystalRe
' To Supply Logon Information to each and every Tables used in the Report
Dim myTable As CrystalDecisions.CrystalRe
Dim myConnectionInfo As New CrystalDecisions.Shared.Co
Dim myLogonInfo As New CrystalDecisions.Shared.Ta
myConnectionInfo.UserID = UserId
myConnectionInfo.Password = Password
myConnectionInfo.ServerNam
myLogonInfo.ConnectionInfo
For Each myTable In ReportTables
myTable.ApplyLogOnInfo(myL
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.CrystalRe
Dim myReportObject As CrystalDecisions.CrystalRe
Dim mySubReport As CrystalDecisions.CrystalRe
Dim mySubReportDoc As CrystalDecisions.CrystalRe
'Loop through each section of the main report
For Each mySection In myReport.ReportDefinition.
'Drill down into the section to see if there are any sub-reports
For Each myReportObject In mySection.ReportObjects
If myReportObject.Kind = _
CrystalDecisions.[Shared].
mySubReport = CType(myReportObject, _
CrystalDecisions.CrystalRe
'Get a reference to the sub-report object
'so we can change its properties
mySubReportDoc = mySubReport.OpenSubreport(
'Set the logon credentials
LogonToDatabase(mySubRepor
End If
Next
Next
ASKER
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
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
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...
ASKER
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?