Re-authenticate prior to server.transfer
From: Alfred Salton (alfred_salton_at_hotmail.com)
Date: 02/14/05
- Next message: DalePres: "Re: more than one page needs connection to DB"
- Previous message: bruce barker: "Re: Pls tell me how to compile in commandlie ?"
- Next in thread: Paul Glavich [MVP ASP.NET]: "Re: Re-authenticate prior to server.transfer"
- Reply: Paul Glavich [MVP ASP.NET]: "Re: Re-authenticate prior to server.transfer"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: DalePres: "Re: more than one page needs connection to DB"
- Previous message: bruce barker: "Re: Pls tell me how to compile in commandlie ?"
- Next in thread: Paul Glavich [MVP ASP.NET]: "Re: Re-authenticate prior to server.transfer"
- Reply: Paul Glavich [MVP ASP.NET]: "Re: Re-authenticate prior to server.transfer"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|