Re-authenticate prior to server.transfer

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Alfred Salton (alfred_salton_at_hotmail.com)
Date: 02/14/05


Date: Mon, 14 Feb 2005 15:52:22 -0700

I am posting a form with data which has timed-out and forced a login. I
assumed that the following code would re-authenticate the session
(assuming the supplied userName and password are correct) but it does
not. Can anyone suggest the solution?

                        if FormsAuthentication.Authenticate(tbUserName.Text, tbPassword.Text) then
                                FormsAuthentication.SetAuthCookie(tbUsername.Text, false)
                                Server.Transfer("destinationPage.aspx", true)
                                
                                'This works, but doesn't transfer the form data.
                                'FormsAuthentication.RedirectFromLoginPage(tbUsername.Text, false)
                        else
                                lblMessage.Text = "<font color=red>Sorry, " & _
                                "invalid username or password!</FONT><P>"
                        end if



Relevant Pages

  • Re: [Full-disclosure] Google Re-authentication Bypass with SID and LSID cookies
    ... ideally the session should be disabled and should be enabled only after ... SID and LSID cookies remain alive at the server side. ... would require a user to provide his/her password to re-authenticate. ... On successful Orkut login, ...
    (Full-Disclosure)
  • Re: Please! Doesnt anyone know a better way to do this?
    ... account, they need to automatically be directed to the page to enter data ... session variable on the Account page. ... I assume here that you're checking a database when the user attempts to ... When a new user attempts to login or clicks to register, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: nooB PhP login using MySQL
    ... This PC has MySQL and IIS configured and running. ... how do I prevent users from bypassing the login? ... create a random string and store in session on server, ... euphemism for md5) but now that there are secure ways, ...
    (comp.lang.php)
  • Re: nooB PhP login using MySQL
    ... This PC has MySQL and IIS configured and running. ... how do I prevent users from bypassing the login? ... create a random string and store in session on server, ... euphemism for md5) but now that there are secure ways, ...
    (comp.lang.php)
  • Re: why a session-based program behaves different on different computers
    ... But if you lose the session you lose ... now, pray-tell, HOW IS THE DATA LOST? ... IF THERE IS NO LOGIN, HOW DO YOU DETERMINE WHICH ROW IT IS? ... let's stick to the architecture for a moment then. ...
    (comp.lang.php)