Page 1 of 1

Timeout if basket sits too long?

Posted: Thu Sep 01, 2011 2:13 pm
by deverill
Hi gang,
We have 7.0.6 and are experiencing the following:
1. Place something in the basket as an anonymous user.
2. Let the browser sit several hours, or overnight after a reboot even.
3. Click View Cart - all the products are there.
4. Click Checkout Now and it redirects to /default.aspx

Is this a known behavior of Able Commerce, .NET, cookies, IE, a combination of them or is something more strange going on? It seems that IE doesn't reliably kill session cookies when you close the browser. In Firefox closing the browser in effect gets a new empty basket, in IE that is not happening, you can come back after a reboot and it will still have your items in the basket.

If this is indeed an IE problem, or even if it's not, does anyone have any ideas on how to make this behave instead of the redirect-to-home behavior? Do you think I could somehow "hand-expire" the cookies or something?

I'm at a loss to track this down. Any ideas appreciated.

Re: Timeout if basket sits too long?

Posted: Fri Sep 02, 2011 9:32 am
by AbleMods
Cookies are used to associate the anonymous user with a particular basket in the system. Plus the cookies have a lifetime that is controlled through AC7. If you have the AC7 setting for anonymous user baskets to expire in 180 days, then that's how long something will stay in the basket.

However I'm surprised to hear it dumping back to the home page when clicking checkout. That's unusual and shouldn't occur.

Is it possible the same PC was used (later that same day) to authenticate the site in a different browser or different instance of the originating browser?

If it was, that could cause the behavior you saw. The system's "last known credentials" didn't match the current cookie, so AC7 says "I don't think so" and throws you back to the home page as a precautionary measure.

Again not entirely sure that's your scenario, but it sure sounds good when I type it out LOL :D

p.s. ASP.Net has a weird issue with security tokens (cookies) that expire in a browser that sits idle beyond the sliding window timeout specified in the web.config.

Re: Timeout if basket sits too long?

Posted: Tue Sep 13, 2011 1:52 pm
by deverill
Thanks Joe and sorry for the delay in replying. It was a combination of a cookie problem and the weird ASP.NET sliding cookie you mentioned... mostly the latter. You're a great help as always!

Re: Timeout if basket sits too long?

Posted: Tue Sep 13, 2011 8:54 pm
by AbleMods
Glad I could help.

ASP.Net does some pretty weird stuff when it comes to timeouts, authentication and session state. Gets frustrating sometimes trying to debug stuff and the timeouts get in the way.