hi guys
my cookie code returns null, I am trying to anonymous users activities and log to a file
Here is my code
and cookie is set as
public IActionResult Index(string key, string value, int? expireTime) { key = "localhost"; value = "Upload_Page"; expireTime = 10000; CookieOptions option = new CookieOptions(); if (expireTime.HasValue) option.Expires = DateTime.Now.AddMinutes(expireTime.Value); else option.Expires = DateTime.Now.AddMilliseconds(10); Response.Cookies.Append(key, value, option); return View(); } string key; string value; int? expireTime; key = Request.Cookies["key"]; value = Request.Cookies["value"]; expireTime = Int32.Parse(Request.Cookies["expireTime"]);