Problem with session time out

A

Alex

Hi
I am currently working on a project and i happened to encountered a problem
which is very pricky.

I have used formsAuthentication in my project. Manually codes an
authenticationTicket. And now i realise a problem which has something to do
with session expiry. My project includes popups of windows. And i realise
that when my session expire, the javascript link on the parent window will
still open up the child window and the redirection to the login page was
done on the pop up instead. But i would like to redirect on the parent
window instead of the popup window.

Any help would be appreciated.
Thanks
 
C

Craig Deelsnyder

Hi
I am currently working on a project and i happened to encountered a
problem
which is very pricky.

I have used formsAuthentication in my project. Manually codes an
authenticationTicket. And now i realise a problem which has something
to do
with session expiry. My project includes popups of windows. And i
realise
that when my session expire, the javascript link on the parent window
will
still open up the child window and the redirection to the login page was
done on the pop up instead. But i would like to redirect on the parent
window instead of the popup window.

Any help would be appreciated.
Thanks

All I can say is somehow track whether the login page is displayed in a
popup window, then redirect the window.opener to the login page and close
the popup window (this all happens in the popup window's Javascript,
meaning in login.aspx, e.g.).

Perhaps the easiest way to tell if your popup was opened by one of your
links is to add some querystring arg (like &window=popup) and then
login.aspx can check for this and do the above logic.

But you have to do this yourself; your link is popping up via Javascript
so there's no way for the server to tell the browser what has happened.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top