Hayato Iriumi
2/10/2007 1:12:00 AM
Hello, folks.
I have an issue using ActiveDS COM object from .NET Framework 2.0.
When I access one of the properties of IADsUser, I get the following
error.
"COM object that has been separated from its underlying RCW cannot be
used"
This doesn't happen all the time, but it happens intermittenly. Here
is the code.
Dim userObject As IADsUser =
oDomainUtils.UserContainer(User.StaffLoginID, User.StaffDomain, False)
_AccountDisabled = userObject.AccountDisabled ' <-- Error happens here
intermittently
So oDomainUtils.UserContainer function returns IADsUser obviously and
the property of userObject (type of IADsUser) AccountDisabled is
accessed, then the error happens intermittenly. We have had this code
for a while and released our product and this error never happened
in .NET Framework 1.1. The tendency we are observing here is that it
happens when I first open the application. When I try it again, the
error doesn't happen.
I have done some Googling and came across fair amount of hits on "COM
object that has been separated from its underlying RCW cannot be used"
error, nothing was specific to ActiveDS COM object. Has anyone
experienced something like this?