HttpWebRequest / CookieContainer - not deleting cookies.

M

macro

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.
 
M

macro

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 said:
Read this article [1] it is very insightful

<%= Clinton Gallagher

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



macro said:
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.
 
C

clintonG

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 said:
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 said:
Read this article [1] it is very insightful

<%= Clinton Gallagher

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



macro said:
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.
 
M

macro

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 said:
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 said:
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 said:
Read this article [1] it is very insightful

<%= Clinton Gallagher

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



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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,231
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top