By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,760 Members | 1,585 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,760 IT Pros & Developers. It's quick & easy.

Can't clear cookie when using .domain property.

P: n/a
Good Day Folks

I'm using the following code when creating, reading, and removing a cookies.

<%
' writing cookie
Response.cookies("OracleLogin")("p_userid")="fcs_s ystem"
Response.cookies("OracleLogin")("p_password")="dev elopfcs"
'Response.cookies("OracleLogin").domain="ocdsb.ca"
%>
<%
' reading cookie
dim p_userid,p_password as string

p_userid=Request.Cookies("OracleLogin")("p_userid" )
p_password=Request.Cookies("OracleLogin")("p_passw ord")
response.write("p_userid=" & p_userid & "<br />")
response.write("p_password=" & p_password & "<br />")
%>
<%
' removing cookie
Response.cookies("OracleLogin")("p_userid")=""
Response.cookies("OracleLogin")("p_password")=""
Response.Cookies("OracleLogin").Expires = DateTime.Now.AddMonths(-2)
%>

Everything works great until I uncomment the
Response.cookies("OracleLogin").domain="ocdsb.ca"
line in the first block. With this line included the removing cookie code
block has no effect. The cookie persists when it should not. The only way
around this is to close browser.

Any ideas ?

--
Thanks in advance
/Serge
Nov 9 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.