Subject: Please help me. ImapException: Previous operation has not finished yet
Date: 2012-02-20 08:08:13
From: Green Mark
Source: please-help-imapexception-previous-operation-not-finished-yet


Dear ComponentPro 

Following error is traced by using the IMAP Client in threads.

Unhandled Exception: ComponentPro.Net.Mail.ImapException: Previous operation has not finished yet.

   at ComponentPro.Net.Mail.ImapClient.AsyncBeginLck() in ComponentPro.UltimateMail\UltimateMail\Net.Imap\ImapClient.cs:line 4175

   at ComponentPro.Net.Mail.ImapClient.SendCommand(String command, Object[] parameters) in EmlMigrationForExchange\ComponentPro.UltimateMail\UltimateMail\Net.Imap\ImapClient.cs:line 2387

In my code snip, it try to create ImapClient object and then connect to the IMAP server in number of thread. 

private static void TestInThread(List<string> Users)


    foreach(string user in Users)

        System.Threading.ThreadPool.QueueUserWorkItem(ConnectToServer, user);

static void ConnectToServer(object asyncState)




        string[] user = Convert.ToString(asyncState).Split(new char[] { ',' });


        ComponentPro.Net.Mail.ImapClient imapClient = new ComponentPro.Net.Mail.ImapClient();

        imapClient.Connect("", 143);

        imapClient.Authenticate(user[0], user[1]);


    catch (Exception ex) { Console.WriteLine(ex);     }


Do you have any ideas for resolving?
---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index