COM objects in asp.net session

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default COM objects in asp.net session

    I have been tasked with migrating a legacy asp website
    into asp.net. The website uses COM objects in session all
    over the place (which is terrible but because the code is
    going to be eventually phased out so its something that
    we want to try to live with a bit longer).

    The problem I am having is that these COM objects
    (written in VB 6) don't survive from 1 page to the next.
    It looks like the wrapper is stored in session but not
    the object itself. When the page goes out of scope it
    looks as if the object is destroyed. This is the error
    message I am getting:

    COM object that has been separated from its underlying
    RCW can not be used.

    Has anybody else experienced this problem? Is it not
    possible to store these COM objects in session? I have
    set aspcompat=true. It appears that storing an ADO
    connection object in session works fine but these VB
    created objects do not.
    Jim Guest

  2. Similar Questions and Discussions

    1. Decrypt / Encrypt Session objects
      Hi! I just want to know if it's common to decrypt a Session-Object in a ASP.NET application. My collegue says that I have not do this because the...
    2. Perceived Loss of All Session Objects
      > Environment: Windows 2000 Server, IIS 5.0, ASP .Net www.aspfaq.com/5002
    3. Threading and Session Objects
      Hi, I´m doing an asp.net application that uploads and downloads files and folders between the client and the server on my intranet. To do this I...
    4. session objects crossing applications
      Set up cookie parameters before calling session_start(): void session_set_cookie_params ( int lifetime ]]) Jason wrote:
    5. options for CGI::Session database_manager objects?
      I'm looking at the source for pgsession at the moment, and it appears that he simply puts things like the hostname, port, db_user, etc as hardcoded...
  3. #2

    Default Re: COM objects in asp.net session

    the error message means you are calling the com object on a different thread
    than it was created in. asp had lots of code to handle sta objects, asp.net
    does not. the best thing you can do with asp.net is host them in com+
    instead of session, then port them as quick as possible.

    -- bruce (sqlwork.com)


    "Jim" <jpetkus@profile-systems.com> wrote in message
    news:0a4701c34a4c$9ecb4f40$a001280a@phx.gbl...
    > I have been tasked with migrating a legacy asp website
    > into asp.net. The website uses COM objects in session all
    > over the place (which is terrible but because the code is
    > going to be eventually phased out so its something that
    > we want to try to live with a bit longer).
    >
    > The problem I am having is that these COM objects
    > (written in VB 6) don't survive from 1 page to the next.
    > It looks like the wrapper is stored in session but not
    > the object itself. When the page goes out of scope it
    > looks as if the object is destroyed. This is the error
    > message I am getting:
    >
    > COM object that has been separated from its underlying
    > RCW can not be used.
    >
    > Has anybody else experienced this problem? Is it not
    > possible to store these COM objects in session? I have
    > set aspcompat=true. It appears that storing an ADO
    > connection object in session works fine but these VB
    > created objects do not.

    bruce barker Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139