S
Serge
Good Day Folks,
Setting the domain attribute when creating a cookie, see code below, seems
to create a problem that I can't expire the cookie later, see 2nd code block.
If I don't set the domain attribute, then expiring the cookie works as
expected. Unfortunately I need to set the domain attribute because the
cookie needs to exist accross multiple servers. Any ideas on how to expire a
cookie which was created using the following code. Thanks in advance. Serge.
' Create cookie
Response.cookies("Cookietest")("p_userid")="jdoe"
Response.cookies("Cookietest")("p_password")="test"
Response.cookies("Cookietest").domain="ocdsb.ca"
' Expire/delete cookie.
Dim aCookie As HttpCookie
aCookie = Request.Cookies("Cookietest")
aCookie.Expires = DateTime.Now.AddDays(-1)
Response.Cookies.Add(aCookie)
Setting the domain attribute when creating a cookie, see code below, seems
to create a problem that I can't expire the cookie later, see 2nd code block.
If I don't set the domain attribute, then expiring the cookie works as
expected. Unfortunately I need to set the domain attribute because the
cookie needs to exist accross multiple servers. Any ideas on how to expire a
cookie which was created using the following code. Thanks in advance. Serge.
' Create cookie
Response.cookies("Cookietest")("p_userid")="jdoe"
Response.cookies("Cookietest")("p_password")="test"
Response.cookies("Cookietest").domain="ocdsb.ca"
' Expire/delete cookie.
Dim aCookie As HttpCookie
aCookie = Request.Cookies("Cookietest")
aCookie.Expires = DateTime.Now.AddDays(-1)
Response.Cookies.Add(aCookie)