Timeout if basket sits too long?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
deverill
Lieutenant (LT)
Lieutenant (LT)
Posts: 64
Joined: Tue Jan 06, 2009 11:58 am
Location: Key West, FL
Contact:

Timeout if basket sits too long?

Post by deverill » Thu Sep 01, 2011 2:13 pm

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.
Jim Sewell - Web Programmer
Trusted Tours & Attractions

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Timeout if basket sits too long?

Post by AbleMods » Fri Sep 02, 2011 9:32 am

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.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
deverill
Lieutenant (LT)
Lieutenant (LT)
Posts: 64
Joined: Tue Jan 06, 2009 11:58 am
Location: Key West, FL
Contact:

Re: Timeout if basket sits too long?

Post by deverill » Tue Sep 13, 2011 1:52 pm

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!
Jim Sewell - Web Programmer
Trusted Tours & Attractions

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Timeout if basket sits too long?

Post by AbleMods » Tue Sep 13, 2011 8:54 pm

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.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply