Hi @Andret_Potapov
I have replicated the issue our client is reporting.
It is running on Windows Server 2019 with all Server protocols except TLS1.2 disabled. The only ciphers available are triple DES 168, AES 128/128 and AES 256/256.
Our application is .NET Framework 3.5 and therefore we are using Aspose.Mail net3.5.
We tried both with and without the following server registry settings to enable TLS1.2 for .NET Framework as required by Microsoft.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v2.0.50727]
“SystemDefaultTlsVersions”=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft.NETFramework\v2.0.50727]
“SystemDefaultTlsVersions”=dword:00000001
I have reproduced just using a personal gmail account. NOTE: You do need the “Less secure App Access” turned on in order to access the account.
The code looks as follows:
Dim loClient As New Aspose.Email.Clients.Imap.ImapClient(“[imap.gmail.com](http://imap.gmail.com/)”, 993, Username, Password)
loClient.SecurityOptions = Aspose.Email.Clients.SecurityOptions.Auto
loClient.Timeout = 30000
loClient.SelectFolder(Aspose.Email.Clients.Imap.ImapFolderInfo.InBox)
The error occurs on the Select Folder command, almost immediately, with following stack trace:
Error Number: OperationCanceledException
Error Source: Aspose.Email
at #=ziwitwnO4FasH_GlpHec4DMUnthY1.#=zywC8bmA=(IAsyncResult #=zvzlFXWw=)
at #=ziwitwnO4FasH_GlpHec4DMUnthY1.#=zzkbeUpA=()
at #=ztZimPpbdaetOUALB$uzoUSgnO7SSvOjqpBuptas=.#=zKBWmfJE=(#=zYHosn79mmfipPCAUhbIlzRy9coTPCTpLEw== #=zJKbRWC4=)
at #=zfkFBhVZ02mSlGg645fNcttrOOJia.#=zfNXGfErS0oDW(Int32 #=zl6vMmkI=, #=zYHosn79mmfipPCAUhbIlzRy9coTPCTpLEw== #=zaNOGz2Y=)
at #=ziwitwnO4FasH_GlpHec4DMUnthY1.#=zG469sIqhWBBs()
at #=z5TbdhmtsS7PqZRtJ_YUHhAkPs$RUdGx_2tCv6GL9KaHW.#=zG469sIqhWBBs()
at #=z$hwMq2510l7Y9HxE5aKvfYDqT0ALuhheqS$J4NE9_Vp7…ctor(EmailClient #=zm9gKbkQ=, String #=zb8f5aq4=, Nullable1 #=zPRMJ0xAu$GBN) at Aspose.Email.Clients.Imap.ImapClient.BeginSelectFolder(IConnection connection, String folderName, Nullable
1 readOnly, AsyncCallback callback, Object state)
at Aspose.Email.Clients.Imap.ImapClient.SelectFolder(IConnection connection, String folderName, Nullable`1 readOnly)
at Aspose.Email.Clients.Imap.ImapClient.SelectFolder(String folderName)
Re-enabling TLS1.0 and TLS1.1 (and possibly some of the ciphers) means it will work and then disabling them break it again. In order to have highest possible security on the server our client prefers to disable TLS 1.0 and TLS1.1 so we need this to work with TLS 1.2.
Any guidance you can provide would be greatly appreciated.
Thanks, Julie