Azure App Configuration connection issue: The request was aborted: Could not create SSL/TLS secure channel.

JB_74 16 Reputation points
2021-03-11T21:27:33.493+00:00

I am attempting to connect to Azure App Configuration store from an App Service in Azure. Using framework 4.8. Web Application attempting to load Azure App Config values. I have searched multiple articles and still have had no luck. Keep getting Could not create SSL/TLS secure channel. it works locally pulling from Azure App Config, but when published to Azure, I get the issue. I have tried: 1) Targeting TLS 1.2 in my global.asax. Also tried setting it to UseDefault. 2) Set TLS 1.2 on the calling App Service TLS settings. 3) Examining code for any references to targeting a specific Security Protocol. [RequestFailedException: The request was aborted: Could not create SSL/TLS secure channel.] Azure.Core.Pipeline.<ProcessInternal>d__5.MoveNext() +1662 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessAsync>d__4.MoveNext() +362 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessNextAsync>d__10.MoveNext() +608 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully() +60 Azure.Core.Pipeline.<ProcessAsync>d__9.MoveNext() +1155 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessAsync>d__5.MoveNext() +763 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessAsync>d__3.MoveNext() +373 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully() +60 Azure.Core.Pipeline.<ProcessAsync>d__8.MoveNext() +349 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessAsync>d__7.MoveNext() +373 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +392 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Data.AppConfiguration.<ProcessAsync>d__4.MoveNext() +978 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully() +60 Azure.Core.Pipeline.<ProcessAsync>d__11.MoveNext() +844 [AggregateException: Retry failed after 4 tries.] Azure.Core.Pipeline.<ProcessAsync>d__11.MoveNext() +1509 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +392 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +392 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +392 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +392 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +392 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.Pipeline.<SendRequestAsync>d__10.MoveNext() +418 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Data.AppConfiguration.<GetConfigurationSettingsPageAsync>d__42.MoveNext() +1659 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Azure.Core.<AsPages>d__2.MoveNext() +282 System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore1.GetResult(Int16 token) +47 Azure.Core.<AsPages>d__2.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token) +11 Azure.<GetAsyncEnumerator>d__6.MoveNext() +1045 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +27 Azure.<GetAsyncEnumerator>d__6.MoveNext() +1336 System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore1.GetResult(Int16 token) +47 Azure.<GetAsyncEnumerator>d__6.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token) +10 System.Threading.Tasks.ValueTask1.get_Result() +93 Microsoft.Configuration.ConfigurationBuilders.<GetAllValuesAsync>d__20.MoveNext() +1434 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +27 Microsoft.Configuration.ConfigurationBuilders.<GetAllValuesAsync>d__20.MoveNext() +1669 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 Microsoft.Configuration.ConfigurationBuilders.<<GetAllValues>b__0>d.MoveNext() +151 [AggregateException: One or more errors occurred.] System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) +4247326 System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) +12576612 System.Threading.Tasks.Task`1.get_Result() +34 Microsoft.Configuration.ConfigurationBuilders.AzureAppConfigurationBuilder.GetAllValues(String prefix) +87 Microsoft.Configuration.ConfigurationBuilders.KeyValueConfigBuilder.EnsureGreedyInitialized() +174 [Exception: Error in Configuration Builder 'AzureAppConfig'::GetAllValues()] Microsoft.Configuration.ConfigurationBuilders.KeyValueConfigBuilder.EnsureGreedyInitialized() +543 Microsoft.Configuration.ConfigurationBuilders.KeyValueConfigBuilder.ProcessConfigurationSection(ConfigurationSection configSection) +299 System.Configuration.ConfigurationBuilderChain.ProcessConfigurationSection(ConfigurationSection configSection) +129

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
214 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JB_74 16 Reputation points
    2021-03-15T17:15:52.71+00:00

    Ultimately the fix for me was to further target the newer framework in my Web.Config file. I added the following entry:

    I had to add the following entry.

    <httpRuntime targetFramework="4.8"/>

    This entry below didn't fix it by itself.

    <compilation debug="true" targetFramework="4.8"/>

    2 people found this answer helpful.

  2. kobulloc-MSFT 26,131 Reputation points Microsoft Employee
    2021-03-15T15:08:52.48+00:00

    There are a number of things that could cause the "Could not create SSL/TLS secure channel" error but if it's working locally and not on Azure, it could be an issue where the operating system is setting the default security protocol for SSL/TLS connections (and that version is not supported by the App Configuration server). If that's not the case then let me know so we can do some additional troubleshooting.