Re: get returning user for forms auth?
- From: Alexey Smirnov <alexey.smirnov@xxxxxxxxx>
- Date: 10 May 2007 02:33:27 -0700
On May 10, 12:24 am, Sergei Shelukhin <realg...@xxxxxxxxx> wrote:
Hi. I have the following scenario; user logs in using standard login
control for forms auth, I validate his credentials against the
database, optionally make the cookie persistent and then set some
application-specific session variables for that user.
Now, when the user closes the browser and returns to the site again
the next day, he will be authenticated if he had logged in previously
w/the checkbox check.
The problem is, I need to initialize the session variables for that
user again when he reenters the site; I pondered checking auth cookie
manually, decrypting the ticket and getting username etc; however that
doesn't seem right. How do I find out that authenticated user is re-
entering the site (in Session_Start event I guess)?
protected void Session_Start(object sender, EventArgs e)
{
if (Request.IsAuthenticated)
{
Session["CurrentUser"] = User.Identity.Name;
}
}
.
- References:
- get returning user for forms auth?
- From: Sergei Shelukhin
- get returning user for forms auth?
- Prev by Date: Re: Stream pdf to browser
- Next by Date: Re: Stream pdf to browser
- Previous by thread: get returning user for forms auth?
- Index(es):
Relevant Pages
|
|