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

Developer technologies | .NET | .NET MAUI
{count} votes

Your answer

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