Me.Context.Request.Cookies value doesn't match what's in cookies file

Discussion in 'ASP .Net' started by Eric, Dec 28, 2007.

  1. Eric

    Eric Guest

    Hello,

    My ASP.NET 2.0 / Classic ASP app is using cookies, and I'm trying to
    figure out a why I'm not seeing a cookie value being initialized in my
    ASP.NET side. I'm using IE 7 and running my app locally using IIS 5.1/
    Win XP Pro SP2, I deleted my cookie file and then was trying to test
    some changes that I'd made to my app to try to recover from this type
    of situation.

    However, when I look at my cookies in IECookiesView 1.70 or if I go to
    C:\Documents and Settings\username\Cookies and look inside the
    cookies, the cookie looks quite different than what I see if I use
    Me.Context.Request.Cookies or if I use the IE Developer toolbar, it's
    kind of like the parable about a man who has two watches never knowing
    the correct time.

    My cookies have crumbs so in the IE developer toolbar or using
    Me.Context.Request.Cookies.Value, I see something like the following
    which came from IE developer toolbar:

    <cookie><name>APP%5FTHM</name><value>LastLoginOrg=1234</
    value><expires>At the end of the Session</expires><domain>localhost</
    domain><path>/</path></cookie>

    This cookie only has one crumb, it should have more.

    However, if I use the IECookiesView 1.70 or if I go to C:\Documents
    and Settings\username\Cookies and look inside the cookie file for
    localhost I see something like:

    <cookie><name>APP%5FTHM</
    name><value>LastLoginOrg=abcd&ThmId=5&ThmClr=3</value><expires>At the
    end of the Session</expires><domain>localhost</domain><path>/</path></
    cookie>.

    Note that there are a lot more crumbs here, and the value of
    LastLoginOrg is different.

    Could the cookie values that IE7 has in memory be different from what
    is on the disk? That would seem to defeat the whole point of using
    cookies.

    -Eric
     
    Eric, Dec 28, 2007
    #1
    1. Advertising

  2. I've seen a lot of instances where, unless you explicitely set an expiration
    date for the cookie that is more than 20 minutes or so, then it is never
    actually written to disk and is only stored in memory until the browser
    instance is closed. Play with setting some explicit timeouts on the cookie
    and see what happens with the file.


    --
    Hope this helps,
    Mark Fitzpatrick
    Microsoft MVP - Expression

    "Eric" <> wrote in message
    news:...
    > Hello,
    >
    > My ASP.NET 2.0 / Classic ASP app is using cookies, and I'm trying to
    > figure out a why I'm not seeing a cookie value being initialized in my
    > ASP.NET side. I'm using IE 7 and running my app locally using IIS 5.1/
    > Win XP Pro SP2, I deleted my cookie file and then was trying to test
    > some changes that I'd made to my app to try to recover from this type
    > of situation.
    >
    > However, when I look at my cookies in IECookiesView 1.70 or if I go to
    > C:\Documents and Settings\username\Cookies and look inside the
    > cookies, the cookie looks quite different than what I see if I use
    > Me.Context.Request.Cookies or if I use the IE Developer toolbar, it's
    > kind of like the parable about a man who has two watches never knowing
    > the correct time.
    >
    > My cookies have crumbs so in the IE developer toolbar or using
    > Me.Context.Request.Cookies.Value, I see something like the following
    > which came from IE developer toolbar:
    >
    > <cookie><name>APP%5FTHM</name><value>LastLoginOrg=1234</
    > value><expires>At the end of the Session</expires><domain>localhost</
    > domain><path>/</path></cookie>
    >
    > This cookie only has one crumb, it should have more.
    >
    > However, if I use the IECookiesView 1.70 or if I go to C:\Documents
    > and Settings\username\Cookies and look inside the cookie file for
    > localhost I see something like:
    >
    > <cookie><name>APP%5FTHM</
    > name><value>LastLoginOrg=abcd&ThmId=5&ThmClr=3</value><expires>At the
    > end of the Session</expires><domain>localhost</domain><path>/</path></
    > cookie>.
    >
    > Note that there are a lot more crumbs here, and the value of
    > LastLoginOrg is different.
    >
    > Could the cookie values that IE7 has in memory be different from what
    > is on the disk? That would seem to defeat the whole point of using
    > cookies.
    >
    > -Eric
     
    Mark Fitzpatrick, Dec 28, 2007
    #2
    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. Follower
    Replies:
    0
    Views:
    315
    Follower
    Oct 13, 2004
  2. mhshpk
    Replies:
    0
    Views:
    563
    mhshpk
    Jul 18, 2007
  3. _Who
    Replies:
    7
    Views:
    2,721
  4. Volkan Civelek

    Match doesn't match

    Volkan Civelek, Jul 19, 2006, in forum: Ruby
    Replies:
    4
    Views:
    171
  5. Norah Jones
    Replies:
    0
    Views:
    101
    Norah Jones
    Apr 7, 2014
Loading...

Share This Page