473,486 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
9 2052
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> ¼¶¼g©ó¶l¥ó·s»D: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> ¼¶¼g©ó¶l¥ó·s»D:%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> ¼¶¼g©ó¶l¥ó·s»D: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> ¼¶¼g©ó¶l¥ó·s»D: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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2334
by: Rafael T. Ugolini | last post by:
Im trying to add more than one cookie with urllib2 but im not getting much sucess. An example... >>> req = urllib2.Request('http://localhost','j_username=psyca&j_password=******',{...
4
5272
by: Shannon Jacobs | last post by:
I'm doing some trivial surveys, and I want to know if the same user answers twice. Can't really know that, but at least I thought I could check for the same browser/computer combination by using a...
4
1715
by: Ziggy | last post by:
The purpose of my application is to require a website visitor to complete a form before participating in a search application. I have a specific reason for doing this with client-side javascript,...
7
5196
by: odonel | last post by:
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: here is my code: HttpCookie cookie = Request.Cookies;
3
7359
by: Karsten Grombach | last post by:
Hi, I'm trying the following: - Imitate a Logon using a Post with HttpWebRequest on remote Webserver (asp 3.0 page using https) - On success redirect to the page (encapsuled in an iframe)...
1
259
by: Rakesh Roberts | last post by:
I think I have a very interesting cookie problem. I use form authentications on my application. Through out my application I started using a toggle control that persists its value for the session...
15
3625
by: Oleg Leikin | last post by:
Hi, (newbie question) I've created some simple .NET ASP application that should store cookies at the client machine. According to the documentation cookie expiration time is set via...
3
1483
by: HIK | last post by:
I have an ASP.NET application on a Win2k3 server. The user is directed to form B (with a query string that contains the logon information). Form B refers to Form A which validates the user...
29
2980
by: Jerim79 | last post by:
I did try to find the answer to this before posting, so this isn't a knee jerk reaction. What I am trying to accomplish is to have a script that opens a cookie, reads a value, and then use a...
0
7305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4863
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.