iis 6 - Cookie not getting removed for certain environments -
i have issue same code (web application) deployed 2 isolated environments behaving differently on "logout".
the apparent key difference server1 not secured protocol, therefore http://myurl
. server2 secured protocol , https://myurl
.
these servers both hosting web application in ii6 , i've combed through settings find difference nothing sticks out. web config doesn't have special declarations of sort.
the "logout" mechanism simple setting expiration of relevant cookie day prior , redirecting home page.
request.cookies["mycookie"].expires = datetime.now.adddays(-1d); response.cookies.add(request.cookies["mycookie"]); response.redirect("~/folder/homepage.aspx");
does have theories on why same code behave differently on 1 server vs other?
i have tried of popular browsers ie8/9, chrome, firefox same results. examining cookie resource utility reveals server1(http) disposes of cookie correctly , server2(https) retains cookie (examine expire date reveals date indeed set yesterday still retaining it.)
turns out because login control generating cookie reused control there hardcoded domain set. grabbed cookie, modified domain value, , set current domain. once done able expire cookie correctly.
Comments
Post a Comment