Last post Aug 08, 2011 01:39 PM by DEVDXB
Jul 30, 2011 05:27 PM|DEVDXB|LINK
i have developed a shoppig cart system for learning purpose in MVC , i am facing an issue with session time out :
# When i am selecting the product from product catalog , the first time its adding the product in the cart
# then as soon as i click over check out , since i have not log in into the system it takes me to login page which is correct.
# once login it takes me back to the page which i came from which is also correct, it now stores the customer id in the session and repliced all the record previously selected with the session deted their customer id which the system gets after login.
# Now if still continue to browse and add try to add few item into the cart the first 2 -3 item it works but then sunddenly its user is logged out as session is time out . but in my local system it works very well but once i upload to share webhosting server
which also supports 4.0 framework.
could you please suggest what could be the hurry , it will be great help if you can
Jul 31, 2011 11:44 AM|umairaslam22|LINK
You can handle session time in tow ways
First of all inclued session time in you web.config file like
<configuration> <system.web> <sessionState timeout="20"></sessionState> </system.web></configuration>
2ndly ask your hosting providers , to increase the session time as sometimes hosting providers decrease time in order to avoid huge user session burdens here is the link
Jul 31, 2011 12:43 PM|DEVDXB|LINK
thanks for quick reply , we have done the same , but unfortunately not helping as soon as sombody click on the second time the link the session goes to blank ... is that there could be something in the code or how can we check the session is available in
the live site as in local debug mode or local iis deployment its working.
Aug 01, 2011 03:39 AM|Topspy|LINK
Are you with shared hosting? It's possible because of the IIS application pool recycle, once the pool resource used up it will recycle itself and session will expire.
Aug 01, 2011 03:47 AM|sirdneo|LINK
There are many reasons why sessin are ternimated unexpectedly. For further details see this link:-
Aug 01, 2011 04:29 AM|vickyshahzad|LINK
There is certainly an issue with your web hosting. Please confirm all the things mentioned in Zeeshan's URL. These are the reasons for session expire.
Aug 08, 2011 01:39 PM|DEVDXB|LINK
yes you are right we are using share hosting ? what is the solution or alternative to this , kindly share some code snippet to help , stuck up for long not able to resolve ...