Last post Nov 15, 2011 12:15 AM by Qi Wu - MSFT
Nov 10, 2011 10:52 AM|Muhammad_Arif|LINK
I have a big web application and most of my pages put data in session which is later used by itself or its child pages. On closing every page, I have an Ajax method which clears the session of page. Every time I clear session for a particular page, I check
if HttpContext.Current.Session.IsNewSession = True, that’s mean my session is expired and give message to close all pages and re-logon (this is normal behavior of my application).
My session expiry time is 60 minutes BUT sometimes, ASP.NET sets the HttpContext.Current.Session.IsNewSession = True even if the session timeout is not happened (say user is using and suddenly she gets session expiry message on my Ajax call).
Can someone tell me why ASP.NET sets HttpContext.Current.Session.IsNewSession = True before the actual timeout even my whole application doesn’t set it explicitly?
Nov 15, 2011 12:15 AM|Qi Wu - MSFT|LINK
Where do you set the session timeout? Do you change it for a short time in your code? I think there may be a lot of session in your code.
And you can also check whether the session has expired like the below links.