W
WJ
Cookie Bakers !
1. I cannot find my cookies in my client XP folder (C:\Documents and
Settings\MyWindowsLoginID\Cookies). I tried to find it while I am still in
the browser and while I log out the web site and quit the browser (MS/IE
6.x). The code is below:
*****************
private void doBakeCookie()
{
string myGuid=Guid.NewGuid().ToString();
FormsAuthentication.Initialize();
bool IWantItPersisted=true;
FormsAuthenticationTicket myFormAuthTicket=new FormsAuthenticationTicket
(1, LogonID.Text, DateTime.Now, DateTime.Now.AddMinutes(60),
IWantItPersisted, myGuid);
string
myEncryptedFormAuthTicket=FormsAuthentication.Encrypt(myFormAuthTicket);
HttpCookie myCookie=new
HttpCookie(FormsAuthentication.FormsCookieName,myEncryptedFormAuthTicket);
Response.Cookies.Add(myCookie);
FormsAuthentication.SetAuthCookie(LogonID.Text,true);
}
***************
2. My Xp enables JS, Cookie, and Session Cookies. Time to expire 1 hour/60
minutes.
3. My web.config is set to CookieLess=False.
4. I am using Session State with cookie. According to Asp.Net, Session ID is
stored in Cookies ? The web site appears to be working properly because all
the pages can query the same session ID via Session.SessioID until I quit
the browser.
Thanks,
John
1. I cannot find my cookies in my client XP folder (C:\Documents and
Settings\MyWindowsLoginID\Cookies). I tried to find it while I am still in
the browser and while I log out the web site and quit the browser (MS/IE
6.x). The code is below:
*****************
private void doBakeCookie()
{
string myGuid=Guid.NewGuid().ToString();
FormsAuthentication.Initialize();
bool IWantItPersisted=true;
FormsAuthenticationTicket myFormAuthTicket=new FormsAuthenticationTicket
(1, LogonID.Text, DateTime.Now, DateTime.Now.AddMinutes(60),
IWantItPersisted, myGuid);
string
myEncryptedFormAuthTicket=FormsAuthentication.Encrypt(myFormAuthTicket);
HttpCookie myCookie=new
HttpCookie(FormsAuthentication.FormsCookieName,myEncryptedFormAuthTicket);
Response.Cookies.Add(myCookie);
FormsAuthentication.SetAuthCookie(LogonID.Text,true);
}
***************
2. My Xp enables JS, Cookie, and Session Cookies. Time to expire 1 hour/60
minutes.
3. My web.config is set to CookieLess=False.
4. I am using Session State with cookie. According to Asp.Net, Session ID is
stored in Cookies ? The web site appears to be working properly because all
the pages can query the same session ID via Session.SessioID until I quit
the browser.
Thanks,
John