Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 17, 2012 08:02 PM by PatrickRR
Jul 27, 2012 08:34 PM|LINK
We have a web page designed to be embedded in an iFrame on a host web site.
The session timeout for the web site that serves up the iFrame page is 20 minutes.
In our testing, the iFrame page times out as expected in various browsers like IE, Chrome, Safari and with IE8/XP and IE9/Win7.
A customer with a classic asp site has embedded our web page in an iFrame on their site. OUr iFrame web page refuses to time out for them except for certain browsers. THey feel they have narrowed it down to IE in Win7 and Vista. It works otherwise.
Any idea why this might be happening? The customer indicates they aren't doing anything to refresh the page and it seems to only happen with IE. They spent a considerable amount of time helping me narrow it down.
Any help on this question would be greatly appreciated.
Jul 28, 2012 07:01 AM|LINK
I am also facing this type of problem in my web application.
Jul 30, 2012 01:52 AM|LINK
we have more ways to adjust session time out such as
visit these links to know more about that
Jul 30, 2012 03:00 PM|LINK
thanks for the informational links. However that doesn't explain why it doesn't timeout in an iFrame in certain browsers and works normally otherwise.
Jul 30, 2012 04:11 PM|LINK
related to this, what would happen to the session if the app pool Idle Timeout kicks in before the session timeout occurs for a page? Does the session variable get set to null or does a new session get created on the next postback of the page? I'm thinking
Jul 30, 2012 05:27 PM|LINK
I just set the app pool idle time to 5 minutes while session timeout was 20. The web site was truly idle for 25 mins. The session timeout still worked as normal. So I have ruled app pool Idle Time out as the culprit. Still stumped.
Jul 31, 2012 11:10 PM|LINK
iframe doesn't affect page Session, it just like use visit the page directly, how did you determine the Session isn't timeout?
Aug 01, 2012 08:37 PM|LINK
the user presses a button on the page in the iFrame that does a postback. Upon postback, it does not timeout.
Aug 08, 2012 06:52 PM|LINK
This is the code we use to detect a timeout on a postback. We intercept the timeout in an overridden OnLoad event in a BasePage class. The base class inherits System.Web.UI.Page.
if (Page.IsPostBack) //only check for timeout on postback, not on page load.
if (Context.Session != null)
// IsNewSession is more advanced then simply checking if
// a cookie is present, it does take into account a session timeout.
// If it says it is a new session, but an existing cookie is found, then it must
// have timed out (can't use the cookie collection because even on first
// request it already contains the cookie.
string cookieHeader = Request.Headers["Cookie"];
if ((cookieHeader != null) && (cookieHeader.IndexOf("MyCookieName") >= 0))
//Response.Redirect goes here....
Aug 17, 2012 08:02 PM|LINK
Stop timeouts forever.