Last post Apr 10, 2014 01:12 PM by IncognitoFuture
Apr 10, 2014 12:13 PM|IncognitoFuture|LINK
I have a web forms project with an iFrame embedded on a page. The pages that are loaded into the project are local to our project therefore on the same server.
Are session is set to use "InProc".
What i want to know is does interacting with the iFrame keep the current session alive?
If not can this be done?
I installed a plugin that displays a message when the user is about to timeout however interacting with the iFrame does not reset this, hence my question.
Note: unfortunately removing the iFrame is not an option
Apr 10, 2014 12:23 PM|AidyF|LINK
Making page requests from the page in the iframe will keep the session alive for the site that hosts the page in the iframe. You haven't stated if the page in the iframe also comes from your site, it's an important bit of the puzzle.
If it *is* from the same site as the one whose session you're trying to keep alive, it depends what "interacting with" means. Requests of some sort that send the session cookies will need to be made to keep the session alive...checking a dropdown or typing
in a box alone isn't going to keep the session going.
Apr 10, 2014 12:31 PM|IncognitoFuture|LINK
Thanks for the quick reply,
Yes both the Page and iFrame our on the same domain.
As for interacting I mean doing various postbacks ie. Submitting forms, Using repeaters to add, delete etc
I'm guessing the plugin I'm using could be broke. Think I will discard the plugin and find something else to display a session timeout message.
Apr 10, 2014 12:35 PM|AidyF|LINK
In that case the session will be being kept alive. As for the sessoin timeout message....don't bother. Espeically in your circumstance. The iframe page doesn't know the session is being kept alive from the parent page, and the parent page doesn't know
if the page in the iframe is keeping the session alive.
Apr 10, 2014 12:46 PM|IncognitoFuture|LINK
Thanks again, is it possible to do a simple redirect when the session times out in that case?
Apr 10, 2014 12:54 PM|AidyF|LINK
The only practical thing you can do with a session timeout is redirect someone to a certain page etc when they make a request after having timed out. asp.net is a request\response technology, you can only give a response (a redirect) in response to a request.
You can't "push" commands to the client from the server. Those session timeout detection things are just glorified timers.
Apr 10, 2014 01:12 PM|IncognitoFuture|LINK
Thanks for the informative reply. It's been very helpful.