none
HTTPS SharePoint site with HTTPS Provider hosted app - The remote certificate is invalid according to the validation procedure RRS feed

  • Question

  • We have SharePoint 2013 site configured with SSL and we have developed a provider hosted app which interacts with SharePoint list.

    If we try accessing the Provider hosted app from the SharePoint site with HTTP [http://mysharepointsite.com/] there are no any errors thrown.

    But whenever the same Provider hosted app is tried accessing from the same SharePoint site using https address [https://mysharepointsite.com/] we are getting below error:

    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:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:
    [AuthenticationException: The remote certificate is invalid according to the validation procedure.]
       System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) +2983172
       System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +473
       System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86
       System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +262
       System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +473
       System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86
       System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +262
       System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +473
       System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86
       System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +262
       System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +473
       System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +8530566
       System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +230
       System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +645
       System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +9
       System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +87
       System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +1467
       System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +84
       System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +22
       System.Net.ConnectStream.WriteHeaders(Boolean async) +761
    
    [WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.]
       System.Net.HttpWebRequest.GetResponse() +8534156
       Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute() +58
       Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb) +975
       ProviderHostedHTTPSWeb.Default.Page_Load(Object sender, EventArgs e) +348
       System.Web.UI.Control.LoadRecursive() +71
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
    
    We have already added the certificate used for the SharePoint site and the provider hosted app in the SharePoint central admin trusts.

    Any idea's how can I resolve this issue?

    Thursday, October 30, 2014 1:36 PM

Answers

All replies