Hello Dirk, thanks for the log and other information.
The `Disconnect` method didn't work because the `Imap` object does not support multiple simultaneous operations. If you are running one method (such as `CheckForUpdates` or its asynchronous variant), you can't call `Disconnect` (or another method) before it ends. The `Dispose` method is an exception to this (it can be called at any time and it terminates any currently running operation).
However, without access to any part of your code, it's difficult to offer advice on it. The general recommendation is to structure your code in such a way that you never call multiple `Imap` methods simultaneously. If you are running `CheckForUpdates` and need to disconnect gracefully, it's recommended to use `Abort` method to end the `CheckForUpdates` call and call `Disconnect` right after `EndCheckForUpdates`.
Calling `BeginCheckForUpdates` on a disposed object doesn't make much sense and it should always fail in that state. The recommendation is to call it for the first time after the `Imap` object has been connected and authenticated and there is no outstanding work to perform. Then, when the background operation ends successfully, call `BeginCheckForUpdates` again (or do something else if there is anything that needs to be done).
Finally, please note that Begin/End asynchronous pattern, which was introduced in 2001 with .NET 1.0, is now considered outdated. We recommend using the Task-based asynchronous pattern instead, preferably with .NET 4.5's async/await keywords which greatly simplify asynchronous programming. Please check out
http://www.rebex.net/secure-mail.net/features/asynchronous-operations.aspx#task-based for more information.