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

Discussion in 'ASP .Net' started by =?Utf-8?B?R2FsaWxlbw==?=, Oct 21, 2003.

  1. Anyone know that is it possible? if yes, how?
    if no, any other method can do something similar to this?
    =?Utf-8?B?R2FsaWxlbw==?=, Oct 21, 2003
    #1
    1. Advertising

  2. 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.

    "Galileo" <> wrote in message
    news:D...
    > Anyone know that is it possible? if yes, how?
    > if no, any other method can do something similar to this?
    Kevin Spencer, Oct 21, 2003
    #2
    1. Advertising

  3. 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.



    "Galileo" <> wrote in message
    news:D...
    > Anyone know that is it possible? if yes, how?
    > if no, any other method can do something similar to this?
    George Ter-Saakov, Oct 21, 2003
    #3
  4. =?Utf-8?B?R2FsaWxlbw==?=

    Scott M. Guest

    Anything you add to the ASP Session object will not become a part of the
    ASP.NET Session object.

    "George Ter-Saakov" <> wrote in message
    news:...
    > 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.
    >
    >
    >
    > "Galileo" <> wrote in message
    > news:D...
    > > Anyone know that is it possible? if yes, how?
    > > if no, any other method can do something similar to this?

    >
    >
    Scott M., Oct 21, 2003
    #4
  5. 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.

    "Scott M." <> wrote in message
    news:e6udFv$...
    > Anything you add to the ASP Session object will not become a part of the
    > ASP.NET Session object.
    >
    > "George Ter-Saakov" <> wrote in message
    > news:...
    > > 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.
    > >
    > >
    > >
    > > "Galileo" <> wrote in message
    > > news:D...
    > > > Anyone know that is it possible? if yes, how?
    > > > if no, any other method can do something similar to this?

    > >
    > >

    >
    >
    George Ter-Saakov, Oct 21, 2003
    #5
  6. =?Utf-8?B?R2FsaWxlbw==?=

    Guest Guest

    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



    >-----Original Message-----
    >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.
    >
    >
    >
    >"Galileo" <> wrote in

    message
    >news:D58BA8C3-7D21-4C2A-AD40-

    ...
    >> Anyone know that is it possible? if yes, how?
    >> if no, any other method can do something similar to

    this?
    >
    >
    >.
    >
    Guest, Oct 21, 2003
    #6
  7. I never worked with ASP classes but my guess would be that you can not keep
    them in the Session.

    George.

    <> wrote in message
    news:044b01c39808$1ecc6d60$...
    > 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
    >
    >
    >
    > >-----Original Message-----
    > >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.
    > >
    > >
    > >
    > >"Galileo" <> wrote in

    > message
    > >news:D58BA8C3-7D21-4C2A-AD40-

    > ...
    > >> Anyone know that is it possible? if yes, how?
    > >> if no, any other method can do something similar to

    > this?
    > >
    > >
    > >.
    > >
    George Ter-Saakov, Oct 21, 2003
    #7
  8. =?Utf-8?B?R2FsaWxlbw==?=

    Rajesh.V Guest

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

    "Galileo" <> wrote in message
    news:D...
    > Anyone know that is it possible? if yes, how?
    > if no, any other method can do something similar to this?
    Rajesh.V, Oct 22, 2003
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Smythe
    Replies:
    3
    Views:
    1,219
    Jeff Smythe
    Jan 2, 2004
  2. far asl via DotNetMonster.com

    How can i share asp session data with asp.net session data

    far asl via DotNetMonster.com, Mar 22, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    534
    =?Utf-8?B?VmliaHUgQmFuc2Fs?=
    Mar 23, 2005
  3. =?Utf-8?B?VG90bw==?=

    Can I retrive a session object by a session ID?

    =?Utf-8?B?VG90bw==?=, Jun 9, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    417
    =?Utf-8?B?VG90bw==?=
    Jun 10, 2006
  4. momo898
    Replies:
    2
    Views:
    478
    bruce barker \(sqlwork.com\)
    Oct 12, 2006
  5. Jazzis
    Replies:
    2
    Views:
    228
    Jazzis
    Sep 23, 2003
Loading...

Share This Page