Lesson 4: Logging off and freeing licenses

This section discusses how to log a user off the Crystal Enterprise system and free up any licenses he or she was using. Recall that a user must have a valid EnterpriseSession object in order to be logged on to the system. In the case of the tutorial, this object was kept as a reference from the InfoStore object, which was used to query the APS. The EnterpriseSession is only destroyed once all references to it have been released. In this case, destroying the InfoStore object that was stored in the Session on the WCS is sufficient to do this. Additionally, it would be beneficial to destroy all variables that were being stored in the Session and release resources on the server. To do this, use the Abandon method. The Abandon method destroys all variables in the WCS Session including the InfoStore object. Additionally, to prevent the user from immediately logging on again, destroy the logon token that was stored as a cookie.

To see a full version of a CSP page that logs off the user, see Logoff.csp.



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com