467,132 Members | 1,152 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,132 developers. It's quick & easy.

Can not clear the cookie form another application

ad
I use the codes below to clear the cookie["us_id"]:

HttpCookie myCookie = new HttpCookie("us_id");
myCookie.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(myCookie);

It do well when the cookie is from the web application itself,
But fail to clear when the cookie is form another application, like php.

How can I do?
Jan 27 '06 #1
  • viewed: 1792
Share:
9 Replies
I had a similar problem once. I just changed the cookie name in my
web.config file to avoid any conflicts. That worked.

ad wrote:
I use the codes below to clear the cookie["us_id"]:

HttpCookie myCookie = new HttpCookie("us_id");
myCookie.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(myCookie);

It do well when the cookie is from the web application itself,
But fail to clear when the cookie is form another application, like php.

How can I do?


Jan 27 '06 #2
ad wrote:
I use the codes below to clear the cookie["us_id"]:

HttpCookie myCookie = new HttpCookie("us_id");
myCookie.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(myCookie);

It do well when the cookie is from the web application itself,
But fail to clear when the cookie is form another application, like
php.
How can I do?


Make sure you use the same Domain and Path as the cookie you want to clear.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jan 27 '06 #3
ad
I have double checkd the Domain and Path,
The domains of both are all null, and the Paths are all "/"

"Dave Anderson" <GT**********@spammotel.com> 撰寫於郵件新聞:uI**************@TK2MSFTNGP15.phx.g bl...
ad wrote:
I use the codes below to clear the cookie["us_id"]:

HttpCookie myCookie = new HttpCookie("us_id");
myCookie.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(myCookie);

It do well when the cookie is from the web application itself,
But fail to clear when the cookie is form another application, like
php.
How can I do?


Make sure you use the same Domain and Path as the cookie you want to
clear.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.

Jan 27 '06 #4
ad
Thanks,
How to change the cookie name in web.config?
"Joey" <jo*********@topscene.com>
???????:11**********************@o13g2000cwo.googl egroups.com...
I had a similar problem once. I just changed the cookie name in my
web.config file to avoid any conflicts. That worked.

ad wrote:
I use the codes below to clear the cookie["us_id"]:

HttpCookie myCookie = new HttpCookie("us_id");
myCookie.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(myCookie);

It do well when the cookie is from the web application itself,
But fail to clear when the cookie is form another application, like php.

How can I do?

Jan 27 '06 #5
ad wrote:
I have double checkd the Domain and Path,
The domains of both are all null, and the Paths are all "/"


I find there is nothing like these two extensions for debugging this kind of
thing:
http://livehttpheaders.mozdev.org/
http://chrispederick.com/work/webdeveloper/

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jan 27 '06 #6
ad
Dose you mean the forms name in authentication section?
I have chane it , but still can't work

<authentication mode="Forms">
<forms name="xxxxxxx" loginUrl="Login.aspx" protection="Validation"
timeout="99999" defaultUrl="Home.aspx">


"ad" <fl****@wfes.tcc.edu.tw> 撰寫於郵件新聞:%2***************@TK2MSFTNGP15.phx. gbl...
Thanks,
How to change the cookie name in web.config?
"Joey" <jo*********@topscene.com>
???????:11**********************@o13g2000cwo.googl egroups.com...
I had a similar problem once. I just changed the cookie name in my
web.config file to avoid any conflicts. That worked.

ad wrote:
I use the codes below to clear the cookie["us_id"]:

HttpCookie myCookie = new HttpCookie("us_id");
myCookie.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(myCookie);

It do well when the cookie is from the web application itself,
But fail to clear when the cookie is form another application, like php.

How can I do?


Jan 27 '06 #7
ad
Can they be used in IE?
"Dave Anderson" <GT**********@spammotel.com> 撰寫於郵件新聞:uV****************@TK2MSFTNGP10.phx .gbl...
ad wrote:
I have double checkd the Domain and Path,
The domains of both are all null, and the Paths are all "/"


I find there is nothing like these two extensions for debugging this kind
of thing:
http://livehttpheaders.mozdev.org/
http://chrispederick.com/work/webdeveloper/

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.

Feb 1 '06 #8
ad wrote:
I find there is nothing like these two extensions for debugging
this kind of thing:
http://livehttpheaders.mozdev.org/
http://chrispederick.com/work/webdeveloper/

Can they be used in IE?


Not to my knowledge. But a Gecko browser should be part of your debugging
toolbox anyway, if only for testing compatibility.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Feb 1 '06 #9
ad
Thanks.
What is Gecko browser ?
"Dave Anderson" <GT**********@spammotel.com> 撰寫於郵件新聞:u0**************@TK2MSFTNGP10.phx.g bl...
ad wrote:
I find there is nothing like these two extensions for debugging
this kind of thing:
http://livehttpheaders.mozdev.org/
http://chrispederick.com/work/webdeveloper/

Can they be used in IE?


Not to my knowledge. But a Gecko browser should be part of your debugging
toolbox anyway, if only for testing compatibility.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.

Feb 3 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Rafael T. Ugolini | last post: by
7 posts views Thread by odonel | last post: by
3 posts views Thread by Karsten Grombach | last post: by
1 post views Thread by Rakesh Roberts | last post: by
15 posts views Thread by Oleg Leikin | last post: by
3 posts views Thread by HIK | last post: by
29 posts views Thread by Jerim79 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.