Server Error in '/' Application.

The remote certificate is invalid according to the validation procedure.

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.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

Source Error:


Line 21:         var task = API.GetPageAsync(id);
Line 22: 
Line 23:         task.Wait(API_TIMEOUT);
Line 24: 
Line 25:         return task.Result;

Source File: c:\inetpub\tradingmatecomau\App_Code\StaticPageManager.cs    Line: 23

Stack Trace:


[AuthenticationException: The remote certificate is invalid according to the validation procedure.]
   System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) +305
   System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) +167

[WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.]
   System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) +762
   System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) +81

[HttpRequestException: An error occurred while sending the request.]
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +32
   TradingMate.Integrations.WP.<GetPageAsync>d__3.MoveNext() in C:\Git\tradingmate\TradingMate.Integrations\WP\WordpressAPI.cs:39

[AggregateException: One or more errors occurred.]
   System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) +4674549
   System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) +14248864
   System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout) +14
   StaticPageManager.GetPage(Int32 id) in c:\inetpub\tradingmatecomau\App_Code\StaticPageManager.cs:23
   _WPPage.Page_Load(Object sender, EventArgs e) in c:\inetpub\tradingmatecomau\WPPage.aspx.cs:20
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4667.0