Solved

User Session expired

Posted on 2003-11-02
14
1,229 Views
Last Modified: 2007-12-19
Hi,

I have a set of crystal reports that I need to let the users view on ASP pages. Therefore I used the Crystal Smart Viewer. It has been working well, until recently, about 3 days back, the user keep experiencing "User Session has expired" when trying to retrieve the pages.

I thought that there may be some issues with the database, so I rebooted it, and it works well for a while, before the "User session has expired" thingy turns up again.

If I run the crystal report directly without going through the ASP page, the report can be displayed.

Can someone help me with why and how can I resolve this problem? Thanks!

I'm using Crystal Report 7, MS SQL database.
0
Comment
Question by:sata
[X]
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
14 Comments
 
LVL 1

Author Comment

by:sata
ID: 9668742
We have tried the solutions provided in Crystaldecisions, but still it's not working. I changed the error message, and got the below:

Error returned: 20534 meaning: Error detected by database DLL.

Could the problem be at the database end?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9671141
How are you calling the report?

Are you passing the correct logon information?

mlmcc
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
LVL 1

Author Comment

by:sata
ID: 9675356
Hi,

I include the connection part for one of the reports:

------------------------------------------------------------------

Dim vReportName
vReportName = "Handover Confirmation Report.rpt"
If Not IsObject (Session("oApp")) Then                              
      Set Session("oApp") = Server.CreateObject("Crystal.CRPE.Application")
End If  
Dim vPath, iLen
vPath = Request.ServerVariables("PATH_TRANSLATED")                    
While (Right(vPath, 1) <> "\" And Len(vPath) <> 0)                      
      iLen = Len(vPath) - 1                                                  
      vPath = Left(vPath, iLen)                                              
Wend    

session("oApp").LogonServer "PDSSQL.DLL", CStr(session("strdbServer")), Cstr(session("strdbDatabase")), CStr(session("strdbUserID")) , CStr(session("strdbPassword"))      

Set Session("oRpt") = Session("oApp").OpenReport(vPath & vReportName, 1)
set Session("oRptOptions") = Session("oRpt").Options
Session("oRptOptions").MorePrintEngineErrorMessages = 0

set Session("ParamCollection") = Session("oRpt").Parameterfields        

Dim Param1, Param2, Param3, Param4, Param5, Param6
set Param1 =  Session("ParamCollection").Item(1)
set Param2 =  Session("ParamCollection").Item(2)
set Param3 =  Session("ParamCollection").Item(3)
Dim ParamValue1, ParamValue2, ParamValue3, ParamValue4, ParamValue5, ParamValue6
ParamValue1 = Session("strUserID")
ParamValue2 = Request.Form("select1")
ParamValue3 = Request.Form("select2")

Call Param1.SetCurrentValue (CStr(ParamValue1), 12)
Call Param2.SetCurrentValue (CStr(ParamValue2), 12)
Call Param3.SetCurrentValue (CDbl(ParamValue3), 7)
On Error Resume Next                                                  
      Session("oRpt").ReadRecords                                          
      If Err.Number <> 0 Then                                              
            Response.Write ("Error returned: " & err.number & " meaning: " & err.description)
      Else

            If IsObject (Session("oPageEngine")) Then                              
                  set Session("oPageEngine") = nothing
            end if
            set Session("oPageEngine") = Session("oRpt").PageEngine            
      End If                                                                

      <HTML>
      <HEAD>
      <TITLE>Seagate Crystal Smart Viewer for ActiveX</TITLE>
      </HEAD>
      <BODY BGCOLOR=C6C6C6 LANGUAGE=VBScript ONLOAD="Page_Initialize">
      <OBJECT ID="CRViewer"
            CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"
            WIDTH=100% HEIGHT=95%
                codebase="/viewer/activeXViewer/activexviewer.cab#Version=2,2,4,28">
      <PARAM NAME="EnableRefreshButton" VALUE=1>
      <PARAM NAME="EnableGroupTree" VALUE=0>
      <PARAM NAME="DisplayGroupTree" VALUE=0>
      <PARAM NAME="EnablePrintButton" VALUE=1>
      <PARAM NAME="EnableExportButton" VALUE=1>
      <PARAM NAME="EnableDrillDown" VALUE=1>
      <PARAM NAME="EnableSearchControl" VALUE=1>
      <PARAM NAME="EnableAnimationControl" VALUE=1>
      <PARAM NAME="EnableZoomControl" VALUE=1>
      </OBJECT>

      <SCRIPT LANGUAGE="VBScript">
      <!--
      Sub Page_Initialize
            On Error Resume Next
            Dim webBroker
            Set webBroker = CreateObject("WebReportBroker.WebReportBroker")
            if ScriptEngineMajorVersion < 2 then
                  window.alert "IE 3.02 users on NT4 need to get the latest version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files are available at Microsoft's web site."
                  CRViewer.ReportName = Location.Protocol + "//" + Location.Host +"/scrreports/rptserver.asp"
            else
                  Dim webSource
                  Set webSource = CreateObject("WebReportSource.WebReportSource")
                  webSource.ReportSource = webBroker
                  webSource.URL = Location.Protocol + "//" + Location.Host + "/scrreports/rptserver.asp"
                  webSource.PromptOnRefresh = True
                  CRViewer.ReportSource = webSource
            end if
            CRViewer.ViewReport
      
      End Sub
      -->
      </SCRIPT>

      </BODY>
      </HTML>
      
<%End If%>

<%
Set objCatRecord = Nothing
Set objCatResponse = Nothing
Set objCat = Nothing
%>
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9675731
One of the causes of the 20534 is invalid logon information

session("oApp").LogonServer "PDSSQL.DLL", CStr(session("strdbServer")), Cstr(session("strdbDatabase")), CStr(session("strdbUserID")) , CStr(session("strdbPassword"))

I don't know ASP that well but is SESSION needed before each string?
Is it retrieving the correct information?

mlmcc
0
 
LVL 1

Author Comment

by:sata
ID: 9675749
Hi,

I don't know ASP that well either, so I can't comment why is "session" required. :(  I inherited this set of codes.
The codes have been running well for 2 years, so I don't think it's likely that it suddenly pick up the wrong values. Anyway, I need try hardcoding the values into:

session("oApp").LogonServer "PDSSQL.DLL", "servername", "dbname", "user", "userpasswd"
(assuming the above are my actual values.)

But the error still occurs.

The interesting thing is, once I reboot my app server and database server, it will run for sometime, and after a while, stop working...
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9675762
I don't know.  The only thing that makes any sense is that you aren't releasing the sessioin when a report closes.

mlmcc
0
 
LVL 1

Author Comment

by:sata
ID: 9675771
so is this wrong or right?

do you think the dll is corrupted?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9676510
Could be but I doubt it.  Has anything changed on your network?

mlmcc
0
 
LVL 1

Author Comment

by:sata
ID: 9676671
No, nothing change in the network. I have checked again and again with the network guys.

Is there a way to check if the login is working fine? Anyway to establish that without using the report?
0
 
LVL 5

Expert Comment

by:erpeters
ID: 9681088
Are you using IIS?  You may need to verify that Session State is enabled in the IIS properties
0
 
LVL 1

Author Comment

by:sata
ID: 9847370
I have tried all means, but doesn't seems to be able to get the crystal report back to a stable state. At times it's just go abnormal, at times it's ok.

Is there any other possible solution to this? If not, I guess I just have to close this question....
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 10667533
Closed, 250 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

690 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