Hi Jerry,
As for restorting FormsAuthentication state, I think it's much easier than
session since the FormsAuthentication.SetAuthCookie method I mentioned
earlier can help regenerate the authenticate cookie. Therefore, I think
what you need to do is just store the username in a custom cookie item. And
later when you need to regenerate the authenticate state, just read the
username from that cookie item and call the
FormsAuthentication.SetAuthCookie, how do you think?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?SmVycnkgQw==?= <jerryed@nospam.nospam>
>References: <6A0F7399-8AD4-47C7-ABB5-BA02BE97BFD3@microsoft.com>
<TTJd7#bfIHA.1500@TK2MSFTNGHUB02.phx.gbl>
>Subject: RE: Reconnect to a session and authenticate.
>Date: Wed, 5 Mar 2008 07:43:03 -0800
>Steven,
>
[quoted text clipped - 33 lines]
>>
>> #SessionIDManager Class
http://msdn2.microsoft.com/en-us/library/system.web.sessionstate.sessionidma
>> nager(VS.80).aspx
>>
>> #ASP.NET 2.0 Training : Customizing the Session State Mechanism
http://www.exforsys.com/tutorials/asp.net-2.0/asp.net-2.0-customizing-the-se
>> ssion-state-mechanism.html
>>
[quoted text clipped - 11 lines]
>>
>> Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications.
>>
[quoted text clipped - 31 lines]
>> >the querystring. The Question is how do I reconnect to the session and
>> >reauthenticate when this page posts back so my session vars are there.
Jerry C - 06 Mar 2008 14:48 GMT
Steven,
Thank you for your reply,
I used :
Dim authTicket As FormsAuthenticationTicket =
FormsAuthentication.Decrypt(Request.QueryString("cdAuth"))
Dim userName As String = authTicket.Name
FormsAuthentication.SetAuthCookie(userName, True)
So I did not have to put the user name in the Qstring. This way I put the
encripted ticket in the Qstring and then decryped the ticket and retrieved
the name and used SetAuthcookie.

Signature
Jerry
Steven Cheng - 07 Mar 2008 00:51 GMT
Thanks for your reply Jerry,
Cool, that's also a good approach since you only store the encrypted ticket
in client side. Thanks for sharing this.
Best regards,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we
can improve the support we provide to you. Please feel free to let my
manager know what you think of
the level of service provided. You can send feedback directly to my manager
at: msdnmg@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?SmVycnkgQw==?= <jerryed@nospam.nospam>
>Subject: RE: Reconnect to a session and authenticate.
>Date: Thu, 6 Mar 2008 06:48:02 -0800
>Steven,
>
[quoted text clipped - 10 lines]
>encripted ticket in the Qstring and then decryped the ticket and retrieved
>the name and used SetAuthcookie.