Hi,
While I'm developing an application based on Idle mechanics, I'm facing a strange behaviour.
Once the message arrives through the handler OnNewMessage, when I try to __Move__, __Copy__ of even __Flag__ the message, __I sometimes get a NotSupportedException__ !
Since the application is multithreaded, __I tried to put a lock section around the call to MoveTo__, __No way__ I still get the bloody exception.
I'm running this through a Unit Test, the one is waiting for new message while it also send mail by the way of an SMTP client to the mailbox. May there is a clue here !
Here is an excerpt of the Stack Trace below:
```
An exception of type 'System.NotSupportedException' occurred and was caught.
----------------------------------------------------------------------------
05/30/2016 21:48:59
Type : System.NotSupportedException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Impossible d'appeler la méthode Read lorsqu'une autre opération read est en attente.
Source : System
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Int32 ProcessRead(Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)
HResult : -2146233067
Stack Trace : Ã System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
à System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count)
à System.IO.StreamReader.ReadBuffer()
à System.IO.StreamReader.ReadLine()
à ImapX.ImapBase.SendAndReceive(String command, IList`1& data, CommandProcessor processor, Encoding encoding, Boolean pushResultToDatadespiteProcessor)
à ImapX.Folder.Select()
à ImapX.Message.CopyTo(Folder folder, Boolean downloadCopy)
à ImapX.Message.MoveTo(Folder folder, Boolean downloadCopy)
```
Thank you for your help!
While I'm developing an application based on Idle mechanics, I'm facing a strange behaviour.
Once the message arrives through the handler OnNewMessage, when I try to __Move__, __Copy__ of even __Flag__ the message, __I sometimes get a NotSupportedException__ !
Since the application is multithreaded, __I tried to put a lock section around the call to MoveTo__, __No way__ I still get the bloody exception.
I'm running this through a Unit Test, the one is waiting for new message while it also send mail by the way of an SMTP client to the mailbox. May there is a clue here !
Here is an excerpt of the Stack Trace below:
```
An exception of type 'System.NotSupportedException' occurred and was caught.
----------------------------------------------------------------------------
05/30/2016 21:48:59
Type : System.NotSupportedException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Impossible d'appeler la méthode Read lorsqu'une autre opération read est en attente.
Source : System
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Int32 ProcessRead(Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)
HResult : -2146233067
Stack Trace : Ã System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
à System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count)
à System.IO.StreamReader.ReadBuffer()
à System.IO.StreamReader.ReadLine()
à ImapX.ImapBase.SendAndReceive(String command, IList`1& data, CommandProcessor processor, Encoding encoding, Boolean pushResultToDatadespiteProcessor)
à ImapX.Folder.Select()
à ImapX.Message.CopyTo(Folder folder, Boolean downloadCopy)
à ImapX.Message.MoveTo(Folder folder, Boolean downloadCopy)
```
Thank you for your help!