'''''''''''''''''''''''''''''''''''''''''''''
    'This file attempts to logon a user using the Single Sign On
    'method.  If the logon fails, then the user is directed to a 
    'logon form.  Note that both the WCS and the Web Server
    'must be configured for SSO before this works.
<META HTTP
    Dim UserID, Password, APS, Aut
    'Retrieve the name of the server to logon to.
    APS = Request.ServerVariables ("WCS_NAME_SERVER")
    'The UserID and Password are empty for SSO.
    'NT Authentication must be used in order to use SSO.
    'Create an Enterprise SessionManager.
    Set SessionManager = Server.CreateObject("CrystalEnterprise.SessionMgr")
        Response.Write "Couldn't create SessionManager."
        'Log the user onto Crystal Enterprise using SSO.
        'Note that the authentication type is secWindowsNT
        'and that the UserID and password are blank.
        Set Sess = SessionManager.Logon(UserID, Password, APS, Aut)
        'Check to see if logon failed.
            'Redirect the user back to the logon page.
            Response.Redirect "LogonForm.csp"
            Set IStore = Sess.Service ("", "InfoStore")
            'Store the InfoStore object in the session.
            'Retrieve the LogonTokenManager.
            Set LogonTokenMgr = Sess.LogonTokenMgr
            'Session("IStore") = Sess.LogonTokenMgr
            'Retrieve a Logon Token and store it in the user's cookie file for later use.
            Response.Cookies("LogonToken") = LogonTokenMgr.CreateLogonTokenEx("", 60, 100)
            'Redirect the user to the site's home page.    
            Response.Redirect "home.csp
| Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |