Subject: Error on using multi threads
Date: 2012-10-14 09:44:37
From: Chris Proud
Source: error-using-multi-threads

My bouce inspector console app works great running a single thread, however when I started to use Parallel.ForEach() to multithread my app I started to get exceptions like this:

Item has already been added. Key in dictionary: ''  Key being added: 'from'
   at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
   at ComponentPro.Net.Mail.MailHeader.ComponentPro_BGG()
   at ComponentPro.Net.Mail.MailHeader.ComponentPro_GFG(String ComponentPro_EGG)
   at ComponentPro.Net.Mail.MailHeader..ctor(String ComponentPro_K2B, IMailHeader ComponentPro_GCC, Boolean ComponentPro_FFG)
   at ComponentPro.Net.Mail.MailHeaderCollection.ComponentPro_JAG(String ComponentPro_EGG, IMailHeader ComponentPro_D3F)
   at ComponentPro.Net.Mail.MailMessage..ctor()
   at ComponentPro.Net.Mail.MailMessage..ctor(String fileName)

---------------------------------------------------------------------- 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