Can ASP, not ASP.NET, add an object to the session

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Anyone know that is it possible? if yes, how?
if no, any other method can do something similar to this?
 
ASP and ASP.net are completely different ISAPIs, and run under different
processes. Therefore, you can't use ASP to write to an ASP.Net Session. What
you CAN do is pass your ASP variables via QueryString or Form submission to
an ASPX page that writes the values to the ASP.Net Session. This can be done
transparently, by using Response.Redirect in the ASP page to pass the
variables in a QueryString to an ASPX page, and in the ASPX page using
Response.redirect to return to wherever you want to return to, such as the
original ASP page.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
What object you are talking about?
String is object too.

You can add string to the Session.

If object is COM object then it depends on how this object is written.
COM object which is declared as Free Threaded and aggregates FTM can be
added to the Session in ASP.

BTW: You can not write such objects in VB. Only C++.

George.
 
Anything you add to the ASP Session object will not become a part of the
ASP.NET Session object.
 
As I understood it's not a requirement.

The question was about ASP and ASP session.

At least that is how I understand it.

George.
 
This is my user-defined class
class ABC
public CC
end class

I make a instance of it and store it at the session
set ee=new ABC
ee.CC="hi"
set Session("myobject")=ee



But when i retrieve it and access the property of my
object, it said that The object does not support this
property or method, is that ASP cannot do this, or my
code has error?
set eee=Session("myobject")
response.write eee.cc
 
I never worked with ASP classes but my guess would be that you can not keep
them in the Session.

George.
 
I think depending on the object if it implemnts ISerializable, it can be
added to the session.
 
Back
Top