You need to create a new session so that ND will process the request. i.e.:

        //[[SPIDER_EVENT<OK_onWebEvent>
        public int OK_onWebEvent(CSpWebEvent event)
        {
                int command = PROCEED;
                try
                {
                        if(CSpider.removeUserSession())
                        {
                                command =
CSpider.makeNewUserSession(this.getMainProject());
                                
                                if(command == PROCEED)
                                {
                                        // Take them all the way out
                                        CSpHttp.setAutoMode(false);
                                        CSpHttp.reset();
                                        CSpHttp.setHttpStatus(302);
        
CSpHttp.write(CSpider.getOutputStream(), "Location: http://wherever" +
"\n\n");
                                        
                                }
                                else
                                {
                                        // You will ned to stream some html
here...
                                }
                        }
                        else
                        {
                                // You were unable to remove the user's
session so you may load any ND page...
                        }
                }
                catch (Exception ex)
                {
                        // whatever you want to do here
                }
                return(command);
        }
        //]]SPIDER_EVENT<OK_onWebEvent>
                                        

-----Original Message-----
From: DAMIAN_O\'[EMAIL PROTECTED]
[mailto:DAMIAN_O\'[EMAIL PROTECTED]]
Sent: Wednesday, June 30, 1999 11:09 AM
To: [EMAIL PROTECTED]
Subject: [ND] Can't execute RemoveUserSession in ND4 on logout


     Hi,
     
     We moved from ND3 to ND4 recently and have come across a number of 
     problems. One such problems relates to CSpider.removeUserSession().
     
     On a logout page we call an external URL (from a button webevent that 
     runs a script to disconnect the user from the database (this is inside 
     our firewall). Upon returning to our project a call is made to 
     CSpider.removeUserSession() with drastic results.
     
     ** The HTML error we see is -
     A severe application error occurred. Please notify the System 
     Administrator immediately! 
     
     Note to the developer: An un-caught Exception has probably occurred in 
     one of the events that have been implemented on the Project class. 
     
     ** The Log error we see is - 
     spider.control.CSpWebEventProcessor:c:930674037927:w:930674042786:crea 
     teDefaultSessionEnvironment: Creating a default Session environment as 
     a way to recover
     
     
     
     I've seen the other suggestions in the forums (move call to the 
     OnBeforeHTMLOutput event etc.) We have tried this we no success. If 
     anybody can help or suggest an alternative method for cleaning up a 
     user session it would be appreciated.
     
     Regards,
     Damian O'Connor
     Senior Software Development Engineer 
     Hewlett Packard International Bank

_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to