Last post Dec 15, 2010 10:51 AM by swetachotalia
Mar 19, 2009 04:54 PM|daxmax|LINK
So I have this code on an old ASP page which I recently updated because we are migrating, and I have set the domain of the cookie to include any subdomains:
Response.cookies("PERSID") = PERSID
if Temporary =false then
Response.Cookies("PERSID").Expires = DateAdd("d", cookieExpires, Date)
Response.Cookies("PERSID").Domain = Domainname
'Where domainname is ".mydomain.com"
The problem is I cannot for the life of me find a way to delete this cookie via ASP.
The traditional overwrite with empty value and set expire to yesterday doesnt' work. The cookies just stare back at me and laugh.
Response.cookies("PERSID") = ""
Response.Cookies("PERSID").Expires = Date() -1
I tried setting the domain level prior to clearnig it but that doesn't do much.
Does anyone have any ideas how to eliminate these cookies?
Classic ASP cookies subdomain delete
Mar 19, 2009 06:32 PM|daxmax|LINK
ok I figured it out. You have to assign the .domainname.com domain when you clear them out otherwise it won't clear them out.
Dec 15, 2010 10:51 AM|swetachotalia|LINK
I am using asp.net and need to delete cookies having subdomain assigned. How to assign domain name while removing the cookies ?