[thelist] Cookies between ASP and ASP.NET?

Ken Schaefer Ken at adOpenStatic.com
Wed Nov 9 18:28:19 CST 2005

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Casey
Subject: [thelist] Cookies between ASP and ASP.NET?

: Is it possible to set a cookie in ASP and retrieve it in ASP.NET?


: It ain't working. 

Then I think you may be doing something wrong.

: I found this on Microsoft (and many other similar 
: articles on other sites): 
: How to Share Session State Between Classic ASP and ASP.NET

Session State <> Cookies - I think this is where you are going wrong. 

Session state is maintained on the server (for ASP inside the hosting Windows
process, and for ASP.NET either inproc, in SQL Server or in ASP.NET Session
State Service). The ASP process (e.g. dllhost.exe) can't just natively reach
into a SQL Server database and transparently retrieve an ASP.NET session. The
only link between sessions and cookies is that the SessionID (something that
identifies the user's session) is passed in a cookie.

If you just want to pass a value, and it's not particularly sensitive, then
just write it to a cookie (Response.Cookies), and read it back again in your
other pages (Request.Cookies)


More information about the thelist mailing list