Feb 01, 2011, 2:13 AM
[CLOSED] Session Expiring Question
Guys,
This is a little complicated, but I'll first explain what I'm trying to do....then go into the problem I'm having.
For my application, I want to conserver server resources, as well as provide some security for when users walk away from a computer with our application logged in. After session expires (say, 30 minutes), I want the "screen" to lock and show a login window (username/password). Logging in will reestablish Session (and reload Session objects like Employee, permissions, etc.) and return the user to what they were doing.
I have this _mostly_ working, but I'm running into a problem. Here's what I have:
This is where the issues happen. Performing any action on the page (master page/page) causes javascript errors, all related to being unable to set properties or call methods on null (setTitle, etc.). The strange thing is, I have a panel that loads an aspx in an iFrame on the page, and all of the actions (binding a Grid, displaying a window, etc.) on the page in the iFrame work just fine (and they are all in the same session...so I know that the session reload is working correctly).
So...why are my objects being destroyed client side (or is that what is happening) when session expires on the server? I didn't think that client side objects using Ext had any sort of automatic wiring to the server, or had objects that were stored server side not during a page lifecycle.
Also, if that is the case, how do I correctly reestablish these objects without reloading the page (and thus losing any changes that were made client side) upon locking -> unlocking the screen.
One final note, I can use the same login window/web services to allow the user to manually lock and unlock the screen and everything works fine. I can try to publish code if you'd like to see what I'm doing but I thought the general concepts might be enough when added to your expert knowledge of the Ext.net framework. :)
Thanks!
Jason
This is a little complicated, but I'll first explain what I'm trying to do....then go into the problem I'm having.
For my application, I want to conserver server resources, as well as provide some security for when users walk away from a computer with our application logged in. After session expires (say, 30 minutes), I want the "screen" to lock and show a login window (username/password). Logging in will reestablish Session (and reload Session objects like Employee, permissions, etc.) and return the user to what they were doing.
I have this _mostly_ working, but I'm running into a problem. Here's what I have:
- I have code that makes asynchronous calls to a custom handler that returns the session timeout date. Since it is a handler, it doesn't depend on session or authentication to work. This code is working perfectly...when the session times out, the javascript function handles the timeout and displays a login window (that is on the masterpage in markup).
- On the submit of the login window, a call to a web service is made that verifies the username and password and reloads Session (similar to what happens when the user logs in the first time).
- When the web service call is finished, the login window is hidden again, returning control to the user.
This is where the issues happen. Performing any action on the page (master page/page) causes javascript errors, all related to being unable to set properties or call methods on null (setTitle, etc.). The strange thing is, I have a panel that loads an aspx in an iFrame on the page, and all of the actions (binding a Grid, displaying a window, etc.) on the page in the iFrame work just fine (and they are all in the same session...so I know that the session reload is working correctly).
So...why are my objects being destroyed client side (or is that what is happening) when session expires on the server? I didn't think that client side objects using Ext had any sort of automatic wiring to the server, or had objects that were stored server side not during a page lifecycle.
Also, if that is the case, how do I correctly reestablish these objects without reloading the page (and thus losing any changes that were made client side) upon locking -> unlocking the screen.
One final note, I can use the same login window/web services to allow the user to manually lock and unlock the screen and everything works fine. I can try to publish code if you'd like to see what I'm doing but I thought the general concepts might be enough when added to your expert knowledge of the Ext.net framework. :)
Thanks!
Jason
Last edited by Daniil; Feb 07, 2011 at 2:43 PM.
Reason: Marked as [CLOSED]. No more information was provided.