Hello Andrei,
Following this:
There are two possibilities: 1) that workaround doesn't work any longer (for whatever reason), 2) your code isn't invoked at all. Add a debug message, say using System.Diagnostic.Debug.WriteLine(); you collect such messages at the run time using the DebugView utility.
I added some logging messages to both the Addinmodule constructor and ClickTwiceModule constructor, logging the ServicePointManager.SecurityProtocol state before and after changing it. Here are the code and the log messages.
AddinModule
public AddinModule()
{
Application.EnableVisualStyles();
InitializeComponent();
// Please add any initialization code to the AddinInitialize event handler
LogWrite("AddinModule. Before. ServicePointManager.SecurityProtocol: " + ServicePointManager.SecurityProtocol.ToString());
ServicePointManager.SecurityProtocol =
SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls
| (SecurityProtocolType)768 /*Tls 1.1*/
| (SecurityProtocolType)3072 /*Tls 1.2*/
| (SecurityProtocolType)12288 /*Tls 1.3*/;
LogWrite("AddinModule. After. ServicePointManager.SecurityProtocol: " + ServicePointManager.SecurityProtocol.ToString());
}
ClickTwiceModule
public SetupCustomUIClickTwiceModule()
{
InitializeComponent();
LogWrite("ClickTwiceModule. Before. ServicePointManager.SecurityProtocol: " + ServicePointManager.SecurityProtocol.ToString());
ServicePointManager.SecurityProtocol =
SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls
| (SecurityProtocolType)768 /*Tls 1.1*/
| (SecurityProtocolType)3072 /*Tls 1.2*/
| (SecurityProtocolType)12288 /*Tls 1.3*/;
LogWrite("ClickTwiceModule. After. ServicePointManager.SecurityProtocol: " + ServicePointManager.SecurityProtocol.ToString());
}
Log
AddinModule. Before. ServicePointManager.SecurityProtocol: SystemDefault
AddinModule.After. ServicePointManager.SecurityProtocol: Ssl3, Tls, Tls11, Tls12, Tls13
ClickTwiceModule. Before. ServicePointManager.SecurityProtocol: Ssl3, Tls
ClickTwiceModule. After. ServicePointManager.SecurityProtocol: Ssl3, Tls, Tls11, Tls12, Tls13
AddinModule. Before. ServicePointManager.SecurityProtocol: Ssl3, Tls
AddinModule. After. ServicePointManager.SecurityProtocol: Ssl3, Tls, Tls11, Tls12, Tls13
As expected, the code is invoked, but the updater log still shows the error:
Add-in Express Updater Log File: 7/31/2021 10:17 AM
Updater version: 1.0.1
Command Line: C:ProgramDataxxx.addinD56A42970B3B430FA5F31744B87CD66B.0.1xxx.AddIn.updater.exe
Operating System: Microsoft Windows NT 6.2.9200.0
------------------------------------------------------------------------
10:17:56 Start
10:17:56 Downloader command line: /updaterPath="C:ProgramDataxxx.addinD56A42970B3B430FA5F31744B87CD66B.0.1xxx.AddIn.updater.exe" /updaterPID=4852 /sid="" /productDir="C:Program Files (x86)xxx" /silentMode="true" /pipeName="98d70dd1591f4b7596d840da3a46881b_1_0_1_UpdaterService" /appId="D56A42970B3B430FA5F31744B87CD66B" /updaterService="On"
10:17:56 Product registry key: SoftwareClickTwiceD56A42970B3B430FA5F31744B87CD66B
10:17:56 'Show Icon' is enabled.'
10:17:56 Loading custom actions: C:ProgramDataxxx.addinD56A42970B3B430FA5F31744B87CD66B.0.1ctionsSetupCustomUI.dll
10:17:56 Success.
10:17:56 Running the updater application...
10:18:06 The background thread started. The update mode: OnInterval
10:18:06 Thread check point 1: IsUpdatable = true
10:18:06 Thread check point 2: NextUpdateTime = 1/1/0001 12:00:00 AM
10:18:07 Thread check point 3: AutoUpdateEnabled = True, IsInstallingUpdate = 0, ConnectionsCount = 0
10:18:07 Thread check point 4: NextUpdateTime = 1/1/0001 12:00:00 AM
10:18:07 Set UI State: CheckingUpdates
10:18:07 Thread check point 5: RootUpdateUrl = https://xxx.yyy/addin/
10:18:07 Set UI State: CheckUpdates
10:18:07 Thread check point 10: NextUpdateTime = 7/31/2021 10:23:07 AM
10:18:07 Date and Time: 7/31/2021 10:18:07 AM
Machine Name: ADI-XPS-NEW
IP Address: fe80::b921:d294:105:a1be%12
Current User: NT AUTHORITYSYSTEM
Application Domain: xxx.AddIn.updater.exe
Assembly Codebase: file:///C:/ProgramData/xxx.addin/D56A42970B3B430FA5F31744B87CD66B/1.0.1/xxx.AddIn.updater.exe
Assembly Full Name: xxx.addin.updater.exe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 1.0.0.0
Exception Source: System
Exception Type: System.Net.WebException
Exception Message: The request was aborted: Could not create SSL/TLS secure channel.
---- Stack Trace ----
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at System.Net.WebClient.DownloadFile(String address, String fileName)
at AddinExpress.Projects.Common.Utilities.DownloadFile(String url, String destFile, IWebProxy proxy)
at AddinExpress.Projects.Common.Utilities.CheckForUpdates(Object module, String url, IWebProxy proxy, String appDir, CTVersionInfo& versionInfo, String currentVersion, String currentLanguage)
at AddinExpress.Deployment.Updater.ADXUpdaterModule.CheckForUpdates(CTVersionInfo& versionInfo)
at AddinExpress.Deployment.Updater.UpdaterEngine.updateWorker_DoWork(Object sender)
In this thread I mentioned before, which presents the same issue, you said The updater is built using .NET 2.0 which doesn't support Tls11 and Tls12. We will think on how we would fix this. As to now, you should use a channel that supports Ssl3 or Tls only. and also I expect a fix for this issue will be available in 3-4 weeks. An update: A new build is expected in 2-3 weeks after the New Year. . This was back in December 2019. So was this updater issue fixed? If yes, is there any patch that can be downloaded and applied? |