G
Guest
Hello!
I am just learning about forms authentication so please excuse this basic
question. I am using .NET 1.1 and C#.
I have created my web.config file and my login.aspx and the associated cs
file using
examples on MSDN. I have created a FormsAuthenticationTicket and cookie and
added the cookie to the response and then set the SetAuthCookie etc. When I
go to the redirected page, I am not sure how to read the cookie value so I
know who the user is!
In my FirstPage.aspx.cs's Page Load method, I have
string userID = Request.Cookies[FormsAuthentication.FormsCookieName].Value;
which is blank. My question is, once I read have created the ticket and
cookie, how to I read it ? Most examples I am looking at talk about the
creating tickets and cookies in forms authentication and not how to read the
cookie so any help will be greatly appreciated. Do I need to decrypt the
ticket?cookie?
Thanks,
I am just learning about forms authentication so please excuse this basic
question. I am using .NET 1.1 and C#.
I have created my web.config file and my login.aspx and the associated cs
file using
examples on MSDN. I have created a FormsAuthenticationTicket and cookie and
added the cookie to the response and then set the SetAuthCookie etc. When I
go to the redirected page, I am not sure how to read the cookie value so I
know who the user is!
In my FirstPage.aspx.cs's Page Load method, I have
string userID = Request.Cookies[FormsAuthentication.FormsCookieName].Value;
which is blank. My question is, once I read have created the ticket and
cookie, how to I read it ? Most examples I am looking at talk about the
creating tickets and cookies in forms authentication and not how to read the
cookie so any help will be greatly appreciated. Do I need to decrypt the
ticket?cookie?
Thanks,