[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Issues with ActiveDS on .NET framework 2.0

(Prasad Dabak)

5/22/2007 7:02:00 AM

Hello,

I have an application that manages various active directory objects
using ActiveDS interop. This application was working fine on .NET
framework 1.1. Recently, I ported this application to .NET 2.0. After
this I am intermittently encountering following errors while setting
AD properties.

1. COM object that has been separated from its underlying RCW cannot
be used.
The typical stack trace reveals the following

Exception: System.Runtime.InteropServices.InvalidComObjectException
Message: COM object that has been separated from its underlying RCW
cannot be used.
Source: Interop.ActiveDs
at ActiveDs.IADsUser.set_AccountDisabled(Boolean retval)

2. Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.

The typical stack trace reveals the following

Exception: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
Source: Interop.ActiveDs
at ActiveDs.IADsUser.SetInfo()

I read on some forums, that this typically happens in a multi-threaded
application where objects created in one thread in accessed from
another thread. Although my application is multi-threaded it doesn't
share any objects across threads.

Has anybody seen similar issues. If so, what is the resolution? Any
help will be much appreciated.

Thanks.
-Prasad