HttpCookie ISYSInfo = new HttpCookie("ISYSSettings"); ISYSInfo.HttpOnly = true; ISYSInfo["UID"] = TxtUserID.Text; ISYSInfo["UserLevel"] = UserLevel.ToString(); Response.Cookies.Add(ISYSInfo);Debugger says it exists - all fine and dandy
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ViewState["RefUrl"] = Request.UrlReferrer.ToString(); //string Uname = Session["UID"].ToString(); HttpCookie reqCookies = Request.Cookies["ISYSInfo"]; if (reqCookies == null) Response.Redirect("ISYSLogin.aspx"); else { string Uname = reqCookies["UID"].ToString(); string AccessLevel = reqCookies["UserAccess"].ToString(); int UserAccess = Convert.ToInt32(AccessLevel); } GetUserInformation(); } }I get redirected back to the Login page because the cookie is null. Everything I've read on the subject says that is all I need to do, but it's ain't working. What am I missing?