Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: Win32Exception during communication Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mackolo22
Groupie
Groupie
Avatar

Joined: 09 October 2018
Location: Poland
Online Status: Offline
Posts: 41
Posted: 12 August 2020 at 8:07am | IP Logged Quote mackolo22

Hello,

We've encountered a problem during communication with one of the mail servers via IMAP protocol. MailBee.NET version is 11.2.0.590

Sample code:
imapClient.DownloadEnvelopes(envelope.Uid.ToString(), true, EnvelopeParts.Envelope | EnvelopeParts.InternalDate | EnvelopeParts.MessagePreview, -2, null, null);

This lane throws following exception:

System.IO.IOException
HResult=0x80131620
Message=The decryption operation failed, see inner exception.
Source=System
StackTrace:
   at System.Net.Security._SslStream.ProcessReadErrorCode(SecurityStatus errorCode, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest, Byte[] extraBuffer)
   at System.Net.Security._SslStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at a.j.h.d3(Byte[] A_0, Int32 A_1)
   at a.a7.d3(Byte[] A_0, Int32 A_1)
   at a.g.j(Int32 A_0)
   at a.g.g(Byte[] A_0, bf A_1, Int32 A_2)
   at a.g.g(String A_0, bf A_1, Int32 A_2)
   at a.ab.c(String A_0, bf A_1, Boolean A_2)
   at a.f.t.o1(String A_0, Boolean A_1)
   at a.f.t.b(String A_0, Boolean A_1, EnvelopeParts A_2, Int32 A_3, String[] A_4, String[] A_5, Boolean A_6, Boolean A_7)
   at a.f.o.b(String A_0, Boolean A_1, EnvelopeParts A_2, Int32 A_3, String[] A_4, String[] A_5)
   at a.f.o.a(Boolean A_0, String A_1, Boolean A_2, EnvelopeParts A_3, Int32 A_4, String[] A_5, String[] A_6)
   at MailBee.ImapMail.Imap.DownloadEnvelopes(String messageIndexSet, Boolean indexIsUid, EnvelopeParts parts, Int32 bodyPreviewSize, String[] extraHeaders, String[] extraItems)


Inner exception is: Win32Exception: The specified data could not be decrypted.

It doesn't happen all the time but we noticed that it's more frequent for messages which have bigger attachments (more than 5 MB). It also happens occasionally after calling imapClient.SelectFolder or imapClient.Disconnect methods.

What can cause this problem? It's well known mail server in Poland and we didn't have any problems with it before. I contacted their support but I'm not sure if they will be able to help us fix this problem.

Best regard.
Back to Top View mackolo22's Profile Search for other posts by mackolo22
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 12 August 2020 at 8:51am | IP Logged Quote Alex

Hi,

First, please try again with the latest version (v12.1), there have been some changes in SSL initialization. If this changes nothing, you can try various value of Imap.SslProtocol (Tls1, Tls11, Tls12).

Also, Googling on this error brings this:

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d63c142c-c408-43be-9ffc-8096d1aff3cb/decrypt-failed-with-error-0x80090326?forum=wcf

Maybe this solution will help (in that article it's about web but there is no big difference).

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
mackolo22
Groupie
Groupie
Avatar

Joined: 09 October 2018
Location: Poland
Online Status: Offline
Posts: 41
Posted: 13 August 2020 at 2:53am | IP Logged Quote mackolo22

Hi Alex,

I tried everything but unfortunately the error still occurs.
I made a small application which entirely downloads messages from inbox. The exception is thrown nearly every time I try to download bigger message (with more than 1MB attachemnt). But sometimes it downloads all messages without a problem. Occasionally it crashes on message which size is ~150KB.

I have no idea how to deal with this problem. I contacted mail server support but of course they replied that they won't fix problems with our mail client. That account works fine on Thunderbird. Our clients also reported that all messages have disappeared from our program and have been downloaded again later. I guess that server administrators made some changes and probably changed UIDs of messages.

Currently we try to set up our own test account on that server. Would it be possible to provide you access to this account so you could try to diagnose the issue?

Best regards.
Back to Top View mackolo22's Profile Search for other posts by mackolo22
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 13 August 2020 at 3:34am | IP Logged Quote Igor

You can send us the access details via HelpDesk; we can't promise anything but we can take a look.

Also we're wondering if you have any idea when exactly the issue started to occur or if there were any changes that triggered it - in your code, or on mailserver side, or perhaps the issue with MailBee was always there? Thank you.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
mackolo22
Groupie
Groupie
Avatar

Joined: 09 October 2018
Location: Poland
Online Status: Offline
Posts: 41
Posted: 13 August 2020 at 3:57am | IP Logged Quote mackolo22

Hi,

Thank you, I will provide you access as soon as we set up the account.

The issue started to occur a few days ago. First report was sent to us on 7 August. We have received 3 reports from our clients to the present day. We didn't make any changes in our code. I don't know if they made changes on mail server side but in my opinion it's their fault cause that error never occured in the past.
Back to Top View mackolo22's Profile Search for other posts by mackolo22
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide