How to fix a random exception "An SSL error has occurred and a secure connection to the server cannot be made"

Umakant Sharma 0 Reputation points
2024-09-30T09:09:32.66+00:00

dotnet version : 8.0.203

maui-ios                   8.0.72/8.0.100        SDK 8.0.200        

maui-android               8.0.72/8.0.100        SDK 8.0.200        

maui-mobile                8.0.72/8.0.100        SDK 8.0.200        

maui                       8.0.72/8.0.100        SDK 8.0.200  

Getting below exception randomly,

An SSL error has occurred and a secure connection to the server cannot be made. ---> System.Net.Http.HttpRequestException: An SSL error has occurred and a secure connection to the server cannot be made. ---> Foundation.NSErrorException: Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://prd-tlmservices-apim.epaysystems.com/prddashboard/dashboard/v1/dashboard/Employee?siteId=31226461&IsTimesheetDataNotRequired=True&IsPTODataNotRequired=False&IsNotificationDataNotRequired=False&IsScheduleDataNotRequired=True&IsMessageDataNotRequired=False&IsPunchDataNotRequired=False, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <EE5C7793-AF16-44E1-8B96-198A4B714941>.<81>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <EE5C7793-AF16-44E1-8B96-198A4B714941>.<81>" ), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://prd-tlmservices-apim.epaysystems.com/prddashboard/dashboard/v1/dashboard/Employee?siteId=31226461&IsTimesheetDataNotRequired=True&IsPTODataNotRequired=False&IsNotificationDataNotRequired=False&IsScheduleDataNotRequired=True&IsMessageDataNotRequired=False&IsPunchDataNotRequired=False, NSUnderlyingError=0x300a71290 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9816, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9816, _NSURLErrorNWPathKey=satisfied (Path is satisfied), viable, interface: pdp_ip0[lte], ipv4, ipv6, dns, expensive, uses cell}}, _kCFStreamErrorCodeKey=-9816} Exception_EndOfInnerExceptionStack at System.Net.Http.NSUrlSessionHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at TLM.NextGenMobileApp.Data.Core.ApiClient.ProcessRequestAsync(IRequest request, Int32 retryCount) Exception_EndOfInnerExceptionStack

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,514 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.