0

次のコードを実行して Azure App Service から Azure App Configuration に接続すると、次の「SSL/TLS セキュア チャネルを作成できませんでした」という例外が発生します。

開発マシン (つまり、Azure App Configuration に接続している開発マシン) でコードを実行すると、問題はありません。私の App Service は次のとおりであることに注意してください: Stack is .NET Framework Version ASP.NET 4.7

ManagedIdentityCredential を使用して接続しようとすると、同じエラーが発生します。

var configurationRoot = configurationBuilder
                .AddAzureAppConfiguration(options =>
                {        
                    options
                        .Connect("Endpoint=blah;Id=blah;Secret=blah")
                        .Select(KeyFilter.Any, LabelFilter.Null)
                        .Select(prefix + ":*");
                }).Build();

次のエラーが発生します。

  The request was aborted: Could not create SSL/TLS secure channel.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    
    Exception Details: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
    
    Source Error:
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    
    Stack Trace:
    
    
    [WebException: The request was aborted: Could not create SSL/TLS secure channel.]
       System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) +54006511
       System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) +83
    
    [HttpRequestException: An error occurred while sending the request.]
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__6.MoveNext() +434
    
    [RequestFailedException: An error occurred while sending the request.]
       Azure.Core.Pipeline.<ProcessAsync>d__6.MoveNext() +1073
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessNextAsync>d__10.MoveNext() +802
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__9.MoveNext() +2483
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__5.MoveNext() +763
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__3.MoveNext() +508
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__8.MoveNext() +612
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__7.MoveNext() +508
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +513
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__6.MoveNext() +1112
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       Azure.Core.Pipeline.<ProcessAsync>d__11.MoveNext() +689
    
    [AggregateException: Retry failed after 3 tries.]
       Azure.Core.Pipeline.<ProcessAsync>d__11.MoveNext() +1410
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +513
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +513
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Microsoft.Extensions.Configuration.AzureAppConfiguration.<ProcessAsync>d__2.MoveNext() +598
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +513
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +513
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<ProcessAsync>d__1.MoveNext() +513
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Core.Pipeline.<SendRequestAsync>d__10.MoveNext() +570
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Azure.Data.AppConfiguration.<GetConfigurationSettingsPageAsync>d__42.MoveNext() +2153
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       Azure.Core.<AsPages>d__2.MoveNext() +479
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token) +119
       Azure.<GetAsyncEnumerator>d__6.MoveNext() +1338
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       Azure.<GetAsyncEnumerator>d__6.MoveNext() +1895
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token) +119
       Microsoft.Extensions.Configuration.AzureAppConfiguration.<<LoadAll>b__4>d.MoveNext() +783
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       Microsoft.Extensions.Configuration.AzureAppConfiguration.<<LoadAll>b__4>d.MoveNext() +1278
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Microsoft.Extensions.Configuration.AzureAppConfiguration.<CallWithRequestTracing>d__4.MoveNext() +809
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Microsoft.Extensions.Configuration.AzureAppConfiguration.<CallWithRequestTracing>d__23.MoveNext() +310
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       Microsoft.Extensions.Configuration.AzureAppConfiguration.<LoadAll>d__15.MoveNext() +1606
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       Microsoft.Extensions.Configuration.AzureAppConfiguration.<LoadAll>d__15.MoveNext() +2641
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
       Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureAppConfigurationProvider.Load() +429
       Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers) +292
       Microsoft.Extensions.Configuration.ConfigurationBuilder.Build() +249
4

2 に答える 2