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

E

Eric

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
 
M

Mark Fitzpatrick

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.
 

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

Similar Threads


Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top