Azure Notification Hub Exception: Could not create SSL/TLS secure channel

Mircea Deliu 31 Reputation points
2021-01-15T18:39:42.897+00:00

Hello,

Since yesterday I have been having problems with my Azure Notification Hub instance.
All the messages sent to my Android app are being dropped because the NotificationHubClient.SendFcmNativeNotificationAsync throws the following exception:

Microsoft.Azure.NotificationHubs.Messaging.MessagingException: Unexpected exception encountered TrackingId:13de39f6-2339-4e63-bce6-a55b4ecc2fcb,TimeStamp:2021-01-15T18:15:44.5236057Z ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.  
   at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)  
   at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)  
   --- End of inner exception stack trace ---  
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
   at Microsoft.Azure.NotificationHubs.NotificationHubClient.<SendRequestAsync>d__201.MoveNext()  
   --- End of inner exception stack trace ---  
   at Microsoft.Azure.NotificationHubs.ExceptionsUtility.HandleUnexpectedException(Exception ex, String trackingId)  
   at Microsoft.Azure.NotificationHubs.NotificationHubClient.<SendRequestAsync>d__201.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
   at Microsoft.Azure.NotificationHubs.NotificationHubClient.<>c__DisplayClass189_0.<<SendNotificationImplAsync>b__0>d.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
   at Microsoft.Azure.NotificationHubs.NotificationHubRetryPolicy.<RunOperation>d__4`1.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
   at Microsoft.Azure.NotificationHubs.NotificationHubRetryPolicy.<RunOperation>d__4`1.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
   at Microsoft.Azure.NotificationHubs.NotificationHubClient.<SendNotificationImplAsync>d__189.MoveNext()  

This has been working fine for the past 6months+ and yesterday it started to crash with the previous exception.
I have checked the TLS/SSL settings or the Azure App Service that is executing the SendFcmNativeNotificationAsync method and the Minimum TLS version is 1.2. Also all my TLS/SSL bindings are correct and valid.

This is URGENT!

Do you have any suggestions?

Any idea if it's possible to restart/reset my Azure Notification Hub instance?

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
295 questions
{count} vote

Accepted answer
  1. Geraldo Aparecido Borges 91 Reputation points
    2021-01-15T22:09:27.653+00:00

    Hello, I solved my problem replacing targetFramework="4.5" to targetFramework="4.7" in every web.config, I hope it can help you too. For more details use this link 58195987

    3 people found this answer helpful.

0 additional answers

Sort by: Most helpful