[thelist] Cookies between ASP and ASP.NET?

Casey aspnet at thecrookstons.com
Wed Nov 9 17:06:39 CST 2005


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

The client has a legacy application all written years ago in ASP, and they 
have requested a small add on which uses a third party plug-in written in 
ASP.NET.  Not a problem, but the one .NET page needs a session variable 
passed around between pages in on the ASP side.

I was never a fan of session variables in ASP and never used them.  But 
regardless, I thought I could just put the value into a cookie on an ASP 
page and then call it back from the .NET page.

It ain't working.  (Both the ASP and .NET files are being served from the 
same server, which I think made a difference in ASP, but they are running in 
the same application context.)

I'd rather not write to a database or external file if I don't have to, and 
passing the value in a querystring is not an option for security reasons. 
(I know... cookies are not secure either, but for the purposes of this 
application, cookies are good enough.)

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

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/converttoaspnet.asp

But what they prose (building a custom COM object) is WAY overkill -  I just 
need to share one little string!!!  I also found some support group posts 
asking more or less the same question, but did not find a definitive answer.

Thanks, Casey 




More information about the thelist mailing list