Or maybe i am doing it wrong, why are the cookies not being set when doing a Redirect?
static void doLogin()
{
var req = HttpContext.Current.Request;
...
user_cookie.set(userId, loginId);
...
HttpContext.Current.Response.Redirect(req["returnLocation"]);
}
static public void set(long userId, long loginId)
{
var cookies = HttpContext.Current.Request.Cookies;
var u = new HttpCookie("userId", userId.ToString());
u.HttpOnly = true;
var l = new HttpCookie("loginId", loginId.ToString());
l.HttpOnly = true;
cookies.Add(u);
cookies.Add(l);
}