Hi there,

I can't seem to figure out why the cookie I've created doesn't get written
to disk...i.e. first time the cookie is created...and saves the value I've
assigned to key...it works great till I reboot my machine from where I'm
making the request from...it then creates a cookie again...it's although the
cookie was not created. Can someone please tell me what I'm doing
wrong...much appreciated.

This is what its doing:
* bootup
* make request - creates cookie
* make request - look-up cookie value
* make request - look-up cookie value
* make request - look-up cookie value
* reboot
* make request - creates cookie
* make request - look-up new cookie value
* make request - look-up new cookie value
* reboot
* make request - creates cookie
....etc.

This is what I expect it to do:
* bootup
* make request - creates cookie
* make request - look-up cookie value
* make request - look-up cookie value
* make request - look-up cookie value
* reboot
* make request - look-up cookie value
* make request - look-up cookie value
* reboot
* make request - look-up cookie value
....etc.

//////// CODE BEGIN ////////
if(context.Request.Browser.Cookies) { // Browser accepts cookies.

HttpCookie http_cookie = context.Request.Cookies["Dan"];

if(http_cookie == null) { // Cookie does not exist.

context.Response.Write("NO COOKIE");

http_cookie = new HttpCookie("Dan");
http_cookie.Values["Age"] = "21";

context.Response.Cookies.Add(http_cookie);

}else{ // Cookie exists.

// Get value for user id.
age = Convert.ToInt64(http_cookie["Age"]);

context.Response.Write("COOKIE - " + Convert.ToString(age));

}
}
//////// CODE END ////////