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
Azure Notification Hub Exception: Could not create SSL/TLS secure channel
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?