ASP session vs. ASP.NET session

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

Is it possible to define a SESSION("userid") in ASP and then retrieve its
value from ASP.NET? (Suppose I have an application in both ASP and
ASP.NET.)

Thanks.
 
No. Your best bet might be to use something like cookies.

Unless there is no other way for your problem, I would suggest not mixing
code environments. The reason being that ASP and ASP.NET are handled by
entirely different execution engines. You run into a lot of problems as one
group of pages does not know that the other exists. Because they use
different engines, the do not share memory space. This can lead to logical
inconsistencies. Suppose that a user accesses your home page, which might
be ASP.NET. A session is started. Now, they navigate to another page that
is ASP only. A second session is started, even though logically the user is
in the same web application.

I think this is how things work.
 
From what I understand the two can exist together but not
share data, but if I were in your situation I would
simply use Response.Redirect with a querystring parameter
to pass data. Don't forget to encode it.
 
This would be painfully slow and overengineered and like
the redirect would not support serialization of objects
like ADO Recordsets (though you could convert them to XML
strings). The article also fails to discuss locking
scenarios in the database. I would be very judicious
about what you need to share between the two and either
use the redirect approach or a persistant data store like
MSDE or SQL Server.
 
if you have any concerns or questions about the solution, please take them
up with the author of the article, (e-mail address removed).
 
Back
Top