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

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

  1. #1

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

    Hello All,

    I am trying to create a web service. This web service for
    now, has to use couple of exisiting COM components. I
    have added them in my .NET project as COM interop. Most
    of the time it works great. But randomly we get an error

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

    Which is kind of wierd because the code looks like
    following

    commOject = new ComObjectClass();
    commObject.SomeFunc();
    commObject.SomeProp = SomeValue;
    CommObject.DataReady+= new dataReadyHandler(SomeHandler)

    First three lines excecute just fine. And the fourth line
    throws the exception.

    Has anybody faced this problem? Your help / suggestions
    is greatly appreciated.

    Thanks.

    Rahul.



    Rahul T. Guest

  2. Similar Questions and Discussions

    1. Re-composing separated PDFs
      Is there a way to re-compose separated PDF's from Quark? We're using Acrobat 6 on a G5 running 10.4.8. We have a 5 plate document, the 5th of which...
    2. line separated file
      I have line separated file. Every line represent something. I need to extraxt these lines into Array or something else so after that I can...
    3. splitting string, | - separated
      Ereg did it again.. Again I'm having a headache :-) 00034355 | 00034355 | OKI PRINTER MICROLINE 280 EPSON COMPATIBLE PARALLEL ...
    4. Separated DLLs for user controls
      Hi, By default VS.NET generates just one DLL contains all code behinds and userconrols. Is it possible to have VS.NET partitione them in their...
    5. comma separated to SQL Server DB table
      http://www.aspfaq.com/2248 "John" <john.reed@intel.com> wrote in message news:0b7c01c344bb$70f47d30$a001280a@phx.gbl...
  3. #2

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

    the error means you are calling a sta com object from a different thread.
    set aspcompat to true.


    "Rahul T." <rtalwalkar@betasys.com> wrote in message
    news:00f701c34a1b$a693c3a0$a101280a@phx.gbl...
    > Hello All,
    >
    > I am trying to create a web service. This web service for
    > now, has to use couple of exisiting COM components. I
    > have added them in my .NET project as COM interop. Most
    > of the time it works great. But randomly we get an error
    >
    > "COM object that has been separated from its underlying
    > RCW can not be used."
    >
    > Which is kind of wierd because the code looks like
    > following
    >
    > commOject = new ComObjectClass();
    > commObject.SomeFunc();
    > commObject.SomeProp = SomeValue;
    > CommObject.DataReady+= new dataReadyHandler(SomeHandler)
    >
    > First three lines excecute just fine. And the fourth line
    > throws the exception.
    >
    > Has anybody faced this problem? Your help / suggestions
    > is greatly appreciated.
    >
    > Thanks.
    >
    > Rahul.
    >
    >
    >

    bruce barker Guest

  4. #3

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

    Thanks for your response.

    But the COM object I am trying to use is an apartment
    threaded object. And a call on it just on the previous
    line was successful.

    Also I am kinda new in .net. Where do I set
    the "aspcompat"

    Thanks
    >-----Original Message-----
    >the error means you are calling a sta com object from a
    different thread.
    >set aspcompat to true.
    >
    >
    >"Rahul T." <rtalwalkar@betasys.com> wrote in message
    >news:00f701c34a1b$a693c3a0$a101280a@phx.gbl...
    >> Hello All,
    >>
    >> I am trying to create a web service. This web service
    for
    >> now, has to use couple of exisiting COM components. I
    >> have added them in my .NET project as COM interop. Most
    >> of the time it works great. But randomly we get an
    error
    >>
    >> "COM object that has been separated from its underlying
    >> RCW can not be used."
    >>
    >> Which is kind of wierd because the code looks like
    >> following
    >>
    >> commOject = new ComObjectClass();
    >> commObject.SomeFunc();
    >> commObject.SomeProp = SomeValue;
    >> CommObject.DataReady+= new dataReadyHandler
    (SomeHandler)
    >>
    >> First three lines excecute just fine. And the fourth
    line
    >> throws the exception.
    >>
    >> Has anybody faced this problem? Your help / suggestions
    >> is greatly appreciated.
    >>
    >> Thanks.
    >>
    >> Rahul.
    >>
    >>
    >>
    >
    >
    >.
    >
    Rahul T. 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