locked
Are there any alternatives to Session.Abandon? RRS feed

  • Question

  • User-1930983775 posted
    I have an e-commerce app that submits to world pay for card processing, I use the session to store UserID for account related data filtering, and all apeared to work fine. However I have just noticed that if you go through the entire checkout process and return to my site, the callback page does all the updates to the orders db, sends email and then calls session.abandon() to make sure the old cart & order ID's are destroyed. If you then add more items and checkout for a second time the callback fails. I then did a further check, closing and reopening the browser, adding a few items, then calling session abandon() (via a cancel order page) and started shopping again, after checkout the callback failed! as far as I can see the only thing that could possibly be causing this and the only thing that is the same between the two methods described above is the use of session.abandon() are there any other methods for ensuring all session data is cleared? Many thanks Que
    Saturday, December 20, 2003 5:56 PM

All replies

  • User1341174311 posted
    I'm not sure I follow you, but you could try the Clear() method. PS: I moved your post to this forum; I hope you don't mind.
    Saturday, December 20, 2003 7:56 PM
  • User-583980620 posted
    What's used in the callback page? Is there a session ID for the user that's getting wiped out? (Such as customer number?) I would try removing only the session objects you want removed, without clearing the whole session. Use Session.Remove(key), because not only will it erase the value, it also erases the key name from session state. (Session[key]=null will erase the value but leave the variable behind.)
    Friday, December 26, 2003 5:46 PM
  • User898263470 posted
    I had the same problem where Abandon was not clearing my session values. Try Session.RemoveAll() That worked for me.
    Wednesday, January 7, 2004 10:48 AM