Error during Click Once Update: The request was aborted: Could not create SSL/TLS secure channel.

Add-in Express™ Support Service
That's what is more important than anything else

Error during Click Once Update: The request was aborted: Could not create SSL/TLS secure channel.
 
Ken Puls




Posts: 34
Joined: 2014-12-17
We've just had a user report this issue to us. (Details below) In searching I've found the following post: https://www.add-in-express.com/forum/read.php?FID=5&TID=15706&MID=81348, which indicates a fix is coming. Just curious if its been deployed yet, and if not how we can resolve this...

PLATFORM VERSION INFO
	Windows 			: 6.1.7601.65536 (Win32NT)
	Common Language Runtime 	: 4.0.30319.42000
	System.Deployment.dll 		: 4.8.3761.0 built by: NET48REL1
	clr.dll 			: 4.8.4069.0 built by: NET48REL1LAST_B
	dfdll.dll 			: 4.8.3761.0 built by: NET48REL1
	dfshim.dll 			: 4.0.41209.0 (Main.041209-0000)

SOURCES
	Deployment url			: file:///D:/Excel%20Information/Excel%20Guru/1%20-%20Monkey%20Tools/monkeytools.application
	Deployment Provider url		: https://www.excelguru.ca/software/monkeytools/monkeytools.application

ERROR SUMMARY
	Below is a summary of the errors, details of these errors are listed later in the log.
	* Activation of D:Excel InformationExcel Guru - Monkey Toolsmonkeytools.application resulted in exception. Following failure messages were detected:
		+ Downloading https://www.excelguru.ca/software/monkeytools/monkeytools.application did not succeed.
		+ The request was aborted: Could not create SSL/TLS secure channel.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
	No transaction error was detected.

WARNINGS
	There were no warnings during this operation.

OPERATION PROGRESS STATUS
	* [4/29/2020 12:13:15 PM] : Activation of D:Excel InformationExcel Guru - Monkey Toolsmonkeytools.application has started.

ERROR DETAILS
	Following errors were detected during this operation.
	* [4/29/2020 12:13:15 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
		- Downloading https://www.excelguru.ca/software/monkeytools/monkeytools.application did not succeed.
		- Source: System.Deployment
		- Stack trace:
			at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
			at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
			at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState, X509Certificate2 clientCertificate)
			at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
			at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
			at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
			at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
			at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri)
			at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown ---
			at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
			at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
			at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
		--- Inner Exception ---
		System.Net.WebException
		- The request was aborted: Could not create SSL/TLS secure channel.
		- Source: System
		- Stack trace:
			at System.Net.HttpWebRequest.GetResponse()
			at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)

COMPONENT STORE TRANSACTION DETAILS
	No transaction information is available.
Ken Puls, FCPA, FCMA, MS MVP
Posted 30 Apr, 2020 18:19:56 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Ken,

You can specify the TLS used right in the constructor of the ADXClickOnceModule (you need to add it to your project):

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;


Those having no SecurityProtocolType.Tls11 and/or SecurityProtocolType.Tls12 declared in their .NET Framework version use numeric values:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | (SecurityProtocolType)768 /*Tls 1.1*/ | (SecurityProtocolType)3072 /*Tls 1.2*/ | (SecurityProtocolType)12288 /*Tls 1.3*/;



Actually, Microsoft suggests using SecurityProtocolType.SystemDefault but this value causes using TLS 1.0 when in an Office add-in. Here's a comment I posted elsewhere:

I've found that a VSTO add-in demonstrates the same behavior and googled out this page: use Ctrl+F to find "Excel" on it - Transport Layer Security (TLS) best practices with the .NET Framework #4675 (URL: https://github.com/dotnet/docs/issues/4675) on gthub/dotnet/docs.


Andrei Smolin
Add-in Express Team Leader
Posted 01 May, 2020 09:48:59 Top
Abdullah Alharbi




Posts: 5
Joined: 2020-02-05
Hi Andrei Smolin,

Andrei Smolin writes:
You can specify the TLS used right in the constructor of the ADXClickOnceModule (you need to add it to your project):


Did you mean by that the ADXClickOnceModule.Designer.[cs|vb]? Specially that the generated partial class ADXClickOnceModule.[cs|vb] cannot include a constructor as it will have an identical signature to the constructor in ADXClickOnceModule.Designer

Regards,

Abdullah
Posted 04 May, 2020 00:34:30 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Abdullah,

No, I meant "the constructor".


Andrei Smolin
Add-in Express Team Leader
Posted 04 May, 2020 01:22:26 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello All,

I've reopened this topic to post an update that I should have posted a while ago:

You can specify the TLS used right in the constructor of the ADXClickOnceModule/ADXClickTwiceModule (you need to add them to your project) or in the constructor of the add-in module:

ServicePointManager.SecurityProtocol = 
     SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;


If you have no SecurityProtocolType.Tls11 and/or SecurityProtocolType.Tls12 declared in the .NET Framework version you are using, use numeric values:

ServicePointManager.SecurityProtocol = 
    SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls 
    | (SecurityProtocolType)768 /*Tls 1.1*/ 
    | (SecurityProtocolType)3072 /*Tls 1.2*/ 
    | (SecurityProtocolType)12288 /*Tls 1.3*/;



Andrei Smolin
Add-in Express Team Leader
Posted 01 Dec, 2020 06:08:10 Top