Logging off user

From: sergei (sssergei@hotmail.com)
Date: 01/28/03


From: "sergei" <sssergei@hotmail.com>
Date: Mon, 27 Jan 2003 21:08:49 -0800


I have created session variable when user login and
on "page_load"(second page)
i am checking
if (Session["YourVariable"] == null)
{
// send the user to login page or ..do something
  Server.Transfer("your login page.aspx");
}

>-----Original Message-----
>Hi,
> I have a two WebForms. The first form is login screen.
After user is logged
>in, he is redirected to the second form. (I use Forms
authentication on my
>web so user must first log in to get to the second form).
On the second
>form, I need to set some timeout and when the timeout
expires I want to log
>off user (need to call
System.Web.Security.FormsAuthentication.SignOut()
>method).
>My problem is that I don't know how to check whether
timeout is already
>expired or not. I tried to use a timer component but it
didn't work. Does
>anyone know how to solve this problem ?
>
>
>.
>



Relevant Pages

  • how to handle two forms in cgi?
    ... user login by their username and password in a form (login ... should show second form for users in their browser. ... second form (search form) which contain last name, ... which users input data. ...
    (comp.lang.python)
  • RE: Application.Run
    ... In order to open the second form using the Application.Run, ... successfully logs in, exit from the thread on which login form is running ... The following code for the button click event of the 'login button' enables ... > logs in,I want to close the login screen and run the main application. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: [SLE] Apache start very slooow...
    ... is started to run instead of the moment apache asks for the passphrase. ... So I am forced to login and call ... Then I tried to set a very large timeout, ... With this setting the script _always_ waits until the timout expires. ...
    (SuSE)
  • Re: Securing static files
    ... It's not the session - it's the authentication timeout - you can set the timeout in the element in web.config. ... they are kicked back to the login page. ... The user may log in with other credentials. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Login TimeOut
    ... I think the Timer control need to be added to all the content page that you ... want to auto redirect from to the Login page after forms timeout. ... Microsoft Online Support ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)