Re: newbie question on forms auth with custom data
- From: "Tim Mackey" <tim.mackey@xxxxxxxxxxxxxxxx>
- Date: Mon, 29 Jan 2007 19:02:44 -0000
hi keith,
i was thinking you could set the cookie expiration to your session timeout value, to maintain consistency. you could add code to your logout routine to remove the cookie. it isn't "integrated" like the approach in the docs, but if that way was causing neural overload then it would be an option at least.
tim
"Keith" <kstay1@xxxxxxxxxxxx> wrote in message news:1170032696.728857.209580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Tim,
Thanks for the reply. This custom data is valid only for the "logged
in user", and so it must expire when the ticket does - so I was
thinking they needed to be together. Does that make sense or am I
just not getting it?
On Jan 27, 6:50 pm, "Tim Mackey" <tim.mac...@xxxxxxxxxxxxxxxx> wrote:hi keith,
sounds like a simple cookie may be the easiest option?
obviously it isn't integrated with the sign-in process, but it may solve the
problem.
tim
"Keith" <kst...@xxxxxxxxxxxx> wrote in messagenews:1169829337.892490.236530@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I have a simple app that uses "simple"formsauthand works quite
> nicely. Now all I want to add is the ability to store a handful of
> custom data in theauthticket and am very confused about how to do so.
> I tried sticking it in a session variable (I come from old asp) but of
> course the session and tickets don't expire at the same time...argh.
> I am authenticating the user against my a mySQL database using:
> ---
> FormsAuthentication.SetAuthCookie(txtUserName.Text, True)
> and
> FormsAuthentication.SignOut()
> ---
> It works great, but the docs I have read talk about using global.asax
> and the prinicpal and encrypt/decrypting cookies and my head starts to
> get fuzzy.
> Can someone supply some sample code to store (and then retrieve) some
> custom data from theauthticket?- Hide quoted text -- Show quoted text -
.
- Follow-Ups:
- References:
- newbie question on forms auth with custom data
- From: Keith
- Re: newbie question on forms auth with custom data
- From: Tim Mackey
- Re: newbie question on forms auth with custom data
- From: Keith
- newbie question on forms auth with custom data
- Prev by Date: Re: Using GLOBAL.ASAX with Classic ASP?
- Next by Date: Re: userName="machine" didn't work
- Previous by thread: Re: newbie question on forms auth with custom data
- Next by thread: Re: newbie question on forms auth with custom data
- Index(es):
Relevant Pages
|
Loading