Re: Session Management when launching "New" Window

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I'm not sure I fully understand the terminology of "forms based
authentication" or a custom one we've written ourselves. So to explain, our
user starts at a login page which accepts their credentials and then our
ASP.NET page [currently] creates a session object against our application
server, which is stored in session state (later this shall become more
light-weight and the application server sessions shall be created on the
fly).

Your suggestion is largely what I was thinking (I think) and part of my
question was querying whether the various browsers are going to complain
about window.close( ) being executed in javascript.

Thanks

Kevin

"Tim Payne" <tim@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23f2UuZVWGHA.5012@xxxxxxxxxxxxxxxxxxxxxxx
Are you using forms based authentiaction, or a custom session based one
that you've coded yourself? You could maybe have the code that checks the
session redirect to a different page rather than the login. You could then
redirect to a page with some javascript that checks if it's a child window
and take action accordingly, something like this:

<script language="javascript" type="text/javascript">
<!--
if (window.opener)
{
//window is a child window, close this window
window.close();
}
else
{
//not a child window, implement your logic for redirecting to
the login page here
}
//-->
</script>

The only thing is, I'm not sure if the window.opener is kept accross page
requests, you'd have to try it and see, but something like that might be
worth looking at?

Tim.




.



Relevant Pages

  • Re: Logged in - Session timeout
    ... You have that info in a session, and then simply send them to: ... take any querystring info with it that you may need.... ... Now the users times out and you redirect them to your login page, ...
    (microsoft.public.inetserver.asp.general)
  • Re: Need to know when user logs in again.
    ... Why not do it in the Login page before you redirect after a successful ... Neither Session start nor that global.asax event are appropriate for this ... > I have a forms based authentication. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Page redirect
    ... The solution is simply save requested url in session and after user logged ... In my application, if someone enters url which requires login, am ... logging, i want to take the user to page from where he has been ... after logging, redirect user to questions/new ...
    (comp.lang.ruby)
  • Re: Session Security
    ... > site within the same browser session, and then attempts to use the ... log them out and redirect to the login page. ... write the current time stamp to the session. ...
    (comp.lang.php)
  • Re: Session Management when launching "New" Window
    ... Are you using forms based authentiaction, or a custom session based one that ... redirect to a different page rather than the login. ... to a page with some javascript that checks if it's a child window and take ...
    (microsoft.public.dotnet.framework.aspnet)