473,407 Members | 2,312 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,407 software developers and data experts.

HttpWebRequest with CookieContainer - not deleting cookie - what is wrong here?

when I use HttpWebRequest with CookieContainer object that handles cookies,
i make more than one request and needs to handle cookies being added and
removed between requests, just like a regular web browser like internet
explorer.

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, and is being sent again with
the old value, while should be deleted - and actually is deleted with
Internet Explorer as client.

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

please help!

TIA.


Apr 10 '06 #1
4 1992
Thus wrote macro,
when I use HttpWebRequest with CookieContainer object that handles
cookies, i make more than one request and needs to handle cookies
being added and removed between requests, just like a regular web
browser like internet explorer.

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, and is being sent
again with the old value, while should be deleted - and actually is
deleted with Internet Explorer as client.

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


Another user mentioned this behaviour a couple of weeks ago :-/

Deleting the cookie from the container manually should work.

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Apr 10 '06 #2
thank you

you might just as well say - you need to re-write the framework

or just a little piece of it.

never mind

i just hope it will be fixed some day

or some microsoft engeenier can post some more formal reply than just you
can overcome the bug by writing your own code instead of the framework code.
conclusion - cookie container can only add cookies and does not honor cookie
removal instructions? is it a bug?

thank you.

"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:94**************************@msnews.microsoft .com...
Thus wrote macro,
when I use HttpWebRequest with CookieContainer object that handles
cookies, i make more than one request and needs to handle cookies
being added and removed between requests, just like a regular web
browser like internet explorer.

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, and is being sent
again with the old value, while should be deleted - and actually is
deleted with Internet Explorer as client.

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


Another user mentioned this behaviour a couple of weeks ago :-/
Deleting the cookie from the container manually should work.

Cheers,
--
Joerg Jooss
ne********@joergjooss.de

Apr 10 '06 #3
BTW

there is no method of the cookiecontainer to remove cookies
"macro" <ma***@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
thank you

you might just as well say - you need to re-write the framework

or just a little piece of it.

never mind

i just hope it will be fixed some day

or some microsoft engeenier can post some more formal reply than just you
can overcome the bug by writing your own code instead of the framework
code.
conclusion - cookie container can only add cookies and does not honor
cookie removal instructions? is it a bug?

thank you.

"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:94**************************@msnews.microsoft .com...
Thus wrote macro,
when I use HttpWebRequest with CookieContainer object that handles
cookies, i make more than one request and needs to handle cookies
being added and removed between requests, just like a regular web
browser like internet explorer.

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, and is being sent
again with the old value, while should be deleted - and actually is
deleted with Internet Explorer as client.

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


Another user mentioned this behaviour a couple of weeks ago :-/
Deleting the cookie from the container manually should work.

Cheers,
--
Joerg Jooss
ne********@joergjooss.de


Apr 10 '06 #4
Thus wrote macro,
BTW

there is no method of the cookiecontainer to remove cookies


In case of doubt, create another CookieContainer and copy all cookies you
need :-/

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Apr 10 '06 #5

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

Similar topics

2
by: Keith Patrick | last post by:
I'm trying to programmatically post data to another page within my ASP.Net app. Not POSTing is not an option (I can't store this data in my session, context, hidden fields, or anything else...I've...
0
by: Alex Papadimoulis | last post by:
Hey Group, I'm in the process of converting an ASP-based site to an ASP.NET site and built a control that wraps around an ASP page. The control simply does a GET to the same server to render the...
0
by: Alex Papadimoulis | last post by:
Hey Group, I'm in the process of converting an ASP-based site to an ASP.NET site and built a control that wraps around an ASP page. The control simply does a GET to the same server to render the...
4
by: macro | last post by:
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.