HttpWebRequest / CookieContainer - not deleting cookies.

Discussion in 'ASP .Net Web Services' started by macro, Mar 25, 2006.

  1. macro

    macro Guest

    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.
     
    macro, Mar 25, 2006
    #1
    1. Advertising

  2. macro

    clintonG Guest

    Read this article [1] it is very insightful

    <%= Clinton Gallagher

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



    "macro" <> wrote in message
    news:...
    > 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.
    >
    >
    >
    >
     
    clintonG, Mar 27, 2006
    #2
    1. Advertising

  3. macro

    macro Guest

    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" <> wrote in message
    news:...
    > Read this article [1] it is very insightful
    >
    > <%= Clinton Gallagher
    >
    > [1] http://www.codeproject.com/aspnet/AspNetCookies.asp
    >
    >
    >
    > "macro" <> wrote in message
    > news:...
    >> 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.
    >>
    >>
    >>
    >>

    >
    >
     
    macro, Mar 27, 2006
    #3
  4. macro

    clintonG Guest

    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" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    >> Read this article [1] it is very insightful
    >>
    >> <%= Clinton Gallagher
    >>
    >> [1] http://www.codeproject.com/aspnet/AspNetCookies.asp
    >>
    >>
    >>
    >> "macro" <> wrote in message
    >> news:...
    >>> 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.
    >>>
    >>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    clintonG, Mar 27, 2006
    #4
  5. macro

    macro Guest

    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" <> wrote in message
    news:%...
    > 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" <> wrote in message
    > news:...
    >> 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" <> wrote in
    >> message news:...
    >>> Read this article [1] it is very insightful
    >>>
    >>> <%= Clinton Gallagher
    >>>
    >>> [1] http://www.codeproject.com/aspnet/AspNetCookies.asp
    >>>
    >>>
    >>>
    >>> "macro" <> wrote in message
    >>> news:...
    >>>> 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.
    >>>>
    >>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    macro, Mar 29, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin Madreza
    Replies:
    0
    Views:
    1,195
    Martin Madreza
    Nov 17, 2003
  2. guyhey
    Replies:
    2
    Views:
    6,032
    zvasanth
    Jan 12, 2008
  3. macro
    Replies:
    4
    Views:
    5,069
    macro
    Mar 29, 2006
  4. Joerg Jooss
    Replies:
    4
    Views:
    747
    macro
    Apr 10, 2006
  5. macro
    Replies:
    0
    Views:
    148
    macro
    Apr 10, 2006
Loading...

Share This Page