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 15:         '//store the files on this server
Line 16:         If File.Exists(Server.MapPath("~/storage/" & uuid.ToString & "_grid.png")) = False Then
Line 17:             wc.DownloadFile(apiserver & "api/puzzles/" & uuid.ToString & "_grid.png", Server.MapPath("~/storage/" & uuid.ToString & "_grid.png"))
Line 18:         End If
Line 19:         If File.Exists(Server.MapPath("~/storage/" & uuid.ToString & "_key.png")) = False Then

Source File: C:\inetpub\wwwroot\www.word-puzzle.com\puzzles\_view.vbhtml    Line: 17

Stack Trace:


[AuthenticationException: The remote certificate is invalid according to the validation procedure.]
   System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) +2310661
   System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +307
   System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +75
   System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +193
   System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +361
   System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +75
   System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +193
   System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +361
   System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +75
   System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +193
   System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +361
   System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +75
   System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +193
   System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +361
   System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +75
   System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +193
   System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +361
   System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +75
   System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +193
   System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +361
   System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +207
   System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +806
   System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +370
   System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +21
   System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +85
   System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +1131
   System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +62
   System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +124
   System.Net.ConnectStream.WriteHeaders(Boolean async) +491

[WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.]
   System.Net.WebClient.DownloadFile(Uri address, String fileName) +659
   ASP._Page_puzzles__view_vbhtml.Execute() in C:\inetpub\wwwroot\www.word-puzzle.com\puzzles\_view.vbhtml:17
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +99
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +185
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   System.Web.WebPages.<>c__DisplayClass40_0.<RenderPageCore>b__0(TextWriter writer) +309
   System.Web.WebPages.WebPageBase.Write(HelperResult result) +108
   ASP._Page_puzzles_vbhtml.Execute() in C:\inetpub\wwwroot\www.word-puzzle.com\puzzles.vbhtml:5
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +99
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +185
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +142


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