Hi, I'm using LinqToActiveDirectory from codeplex and when I'm executing query using DirecotrySource I'm getting the following error:
DisconnectedContext was detected
Message: Context 0x3c5050' is disconnected. Releasing the interfaces from the current context (context 0x3c4f98).This may cause corruption or data loss. To avoid this problem, please ensure that all contexts/apartments stay alive until the applicationis completely done with the RuntimeCallableWrappers that represent COM components that liveinside them.
This occur only when debugging, if i set breakpoint on the last curly brackets of the method and press F10 to finish the execution.when running with no debug it's working as expected. Also, if I'm calling the GC.Collect() before the last curly brackets, i can safely exit. I don't want to call the GC as i know that it's better to leave him to do his work.
I'll be happy to get any idea about how to solve this isuue. Thanks, Tamir.