I have a situation where I write a cookie on one page and read it on another page, but it only works for users who are in the admin group on
our web server.
On my default page, I have this code in the page load event to get some user data from my database and save it for later use:
HttpCookie c = new HttpCookie("userinfo");
c.Values["domainaccount"] = _CtaUser.DomainAccount;
c.Values["userid"] = _CtaUser.UserID.ToString();
c.Values["username"] = _CtaUser.UserName;
c.Values["rolename"] = _CtaUser.RoleName.ToLower();
c.Values["ctaactiveflag"] = (_CtaUser.CTAActiveFlag) ? "1" : "0";
c.Expires = DateTime.Now.AddDays(1d);
&n ...
Go to the complete details ...