Cookies Problem
Hello everyone,
I am doing some work with FormsAuthenctication and have stumbled upon a slight problem. When i call FormsAuthentication.RedirectFromLoginPage([username],[boolean]) this works wonderfully and the user is logged on.
Here is my problem: Using just the above method I am able to use User.Identity to determine who is logged on to my website but I also need to store some other pertinent data so I created a custom cookie to store this data and added it via Response.Cookies.Add()
After implementing this, my FormsAuthetication doesn't appear to be working as User.Identity is returning NULL but, moreover, my custom cookie also comes back as null as well.
I searched on google and came up with the FormsAuthenticationTicket that has a paramerter "UserData" which i can supply to it. This, apparently will wrap up the userlogon and any custom data that I want to add. Unfortunately I lose the ability to reference a Key/Value pair doing it like this and am only able to return the string passed into the ticket. (Which then requires string manipulation to return my values)
So, is there a way to A)Get FormsAutehntication to work with my custom cookies or B)A way to pass in, say, an array or another cookie to a FormsAuthenticationTicket??
Thanks all.
-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
^^Thats my signature
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click  on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
|