473,398 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

HttpWebRequest / CookieContainer - not deleting cookies.

when I use HttpWebRequest with CookieContainer object that handles cookies,
if I have this cookie header in a response:

Set-Cookie: CookieName=; path=/;expires=01-Jan-1999 00:00:00 GMT

the cookie is not deleted for the next request, what should be and actually
done with Internet Explorer as client.

is this a bug is there a solution / workaroung by manually deleting the
cookie?

TIA.


Mar 25 '06 #1
4 5143
Read this article [1] it is very insightful

<%= Clinton Gallagher

[1] http://www.codeproject.com/aspnet/AspNetCookies.asp

"macro" <ma***@discussions.microsoft.com> wrote in message
news:ux**************@tk2msftngp13.phx.gbl...
when I use HttpWebRequest with CookieContainer object that handles
cookies,
if I have this cookie header in a response:

Set-Cookie: CookieName=; path=/;expires=01-Jan-1999 00:00:00 GMT

the cookie is not deleted for the next request, what should be and
actually
done with Internet Explorer as client.

is this a bug is there a solution / workaroung by manually deleting the
cookie?

TIA.

Mar 27 '06 #2
this article discusses the server side handling of cookies while I'm asking
about a specific issue regarding client side cookie handling.
or maybe I miss your point?


"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:ug**************@TK2MSFTNGP14.phx.gbl...
Read this article [1] it is very insightful

<%= Clinton Gallagher

[1] http://www.codeproject.com/aspnet/AspNetCookies.asp

"macro" <ma***@discussions.microsoft.com> wrote in message
news:ux**************@tk2msftngp13.phx.gbl...
when I use HttpWebRequest with CookieContainer object that handles
cookies,
if I have this cookie header in a response:

Set-Cookie: CookieName=; path=/;expires=01-Jan-1999 00:00:00 GMT

the cookie is not deleted for the next request, what should be and
actually
done with Internet Explorer as client.

is this a bug is there a solution / workaroung by manually deleting the
cookie?

TIA.


Mar 27 '06 #3
The method of creating the cookie on the server affects the client-side
behaviors particularly where the Expires atttibute does or does not function
as expected. The article also discusses the expiration date you said your
using and has something to say about that approach.

<%= Clinton Gallagher

"macro" <ma***@discussions.microsoft.com> wrote in message
news:Ok**************@TK2MSFTNGP11.phx.gbl...
this article discusses the server side handling of cookies while I'm
asking about a specific issue regarding client side cookie handling.
or maybe I miss your point?


"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:ug**************@TK2MSFTNGP14.phx.gbl...
Read this article [1] it is very insightful

<%= Clinton Gallagher

[1] http://www.codeproject.com/aspnet/AspNetCookies.asp

"macro" <ma***@discussions.microsoft.com> wrote in message
news:ux**************@tk2msftngp13.phx.gbl...
when I use HttpWebRequest with CookieContainer object that handles
cookies,
if I have this cookie header in a response:

Set-Cookie: CookieName=; path=/;expires=01-Jan-1999 00:00:00 GMT

the cookie is not deleted for the next request, what should be and
actually
done with Internet Explorer as client.

is this a bug is there a solution / workaroung by manually deleting the
cookie?

TIA.



Mar 27 '06 #4
the problem here is handling standard cookie header responses from servers
that are not in my control. those servers exist out there in the internet
and allowed to treat cookie this way.
the problem is that the cookieContainer that is supplied by the framework
doesn't handle this cookie headers as a standard client suppose to - the way
internet explorer does for example.
i hope i make the problem clearer for you and others that might read this
and can help regarding the problem the cookieContainer doesn't delete
cookies it suppose to delete, and what am I as a dot net programmer should
do about that in order to solve the problem.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
The method of creating the cookie on the server affects the client-side
behaviors particularly where the Expires atttibute does or does not
function as expected. The article also discusses the expiration date you
said your using and has something to say about that approach.

<%= Clinton Gallagher

"macro" <ma***@discussions.microsoft.com> wrote in message
news:Ok**************@TK2MSFTNGP11.phx.gbl...
this article discusses the server side handling of cookies while I'm
asking about a specific issue regarding client side cookie handling.
or maybe I miss your point?


"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in
message news:ug**************@TK2MSFTNGP14.phx.gbl...
Read this article [1] it is very insightful

<%= Clinton Gallagher

[1] http://www.codeproject.com/aspnet/AspNetCookies.asp

"macro" <ma***@discussions.microsoft.com> wrote in message
news:ux**************@tk2msftngp13.phx.gbl...
when I use HttpWebRequest with CookieContainer object that handles
cookies,
if I have this cookie header in a response:

Set-Cookie: CookieName=; path=/;expires=01-Jan-1999 00:00:00 GMT

the cookie is not deleted for the next request, what should be and
actually
done with Internet Explorer as client.

is this a bug is there a solution / workaroung by manually deleting the
cookie?

TIA.




Mar 29 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dan | last post by:
Question about the environment used by HttpWebRequest when making requests: When I use IE to browse a site, all of my cookies, etc. are available as part of the request. However, when I make...
1
by: Michal A. Valasek | last post by:
Hello, I have problem deleting cookies and cookies values (using framework version 1.1 on W2003). When I try to remove entire cookie, by calling Response.Cookies.Remove("Test"), nothing...
0
by: Martin Madreza | last post by:
Hello, hope this question wasn't ask to often... I wrote a C# App with an internet connection over HttpWebRequest. To navigate thru some sites i need a cookie (CookieContainer). Now i want...
0
by: Noel Austin | last post by:
I've run into a problem working with the CookieContainer and was wondering if anyone else has noticed this. The CookieContainer reorders it's cookies. When you send it back to the server using...
16
by: Cheung, Jeffrey Jing-Yen | last post by:
I have a windows form application that generates a request, downloads an image, and waits the user to enter in login info. Unfortunately, this image is dynamic and based on session data. I have...
1
by: john conwell | last post by:
I'm trying to programatically mine newsgroups like yahoo (among others), but need to be able to sign into the site first. my assumption is that when i sign in, a session cookie is created and is...
1
by: sameer | last post by:
Hi all, Environment : ASP.NET I am using cookies to store some data. this is done in a class which is called by a web page CookieCreate.aspx. Here is a little bit of code of how i create the...
5
by: rlueneberg | last post by:
I am totally confused. Can someone please illuminate what is going on under the hood in this piece of code from John Lewis. My main confusion is how the cookieContainer can be passed to the...
2
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Fedora Core 5 Linux. Two questions, if I create a cookie under the "/" path ... setcookie('LoggedIn', 1, time() + REMEMBER_ME_TIME, "/"); 1. How do I check if...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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,...
0
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...

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.