R
Rok
Hi,
I am using HttpListener.Response.AppendCookie as:
public void SetCookie(string name, string value, DateTime
expiration)
{
// add new cookie to HTTP response
Cookie ck = new Cookie(name, value);
ck.Expires = expiration;
ck.Discard = false;
HttpListenerContext.Response.AppendCookie(ck);
}
But what I am receiving in a browser is a cookie that has expiry of
exactly 59 seconds, regardless of what I set in ck.Expires. So it is
always a session cookie which disappears as soon as i close the
browser. I used a IEWatch to see the request/response headers and the
response header only returns a cookie and a value, no expiry. Is that a
microsoft bug or am i doing something wrong?
I am using HttpListener.Response.AppendCookie as:
public void SetCookie(string name, string value, DateTime
expiration)
{
// add new cookie to HTTP response
Cookie ck = new Cookie(name, value);
ck.Expires = expiration;
ck.Discard = false;
HttpListenerContext.Response.AppendCookie(ck);
}
But what I am receiving in a browser is a cookie that has expiry of
exactly 59 seconds, regardless of what I set in ck.Expires. So it is
always a session cookie which disappears as soon as i close the
browser. I used a IEWatch to see the request/response headers and the
response header only returns a cookie and a value, no expiry. Is that a
microsoft bug or am i doing something wrong?