Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric - 28 Dec 2007 20:03 GMT
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 - 28 Dec 2007 21:02 GMT
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.

Signature

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression

> Hello,
>
[quoted text clipped - 39 lines]
>
> -Eric

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.