2015-03-02 31 views
0

我們在運行Windows XP和Windows Server 2003的某些計算機上的應用程序出現問題。嘗試通過HTTPS連接到我們的web服務時,應用程序崩潰。事件查看器在崩潰後顯示以下內容:無法在某些Windows XP/Server 2003計算機上建立HTTPS連接

Exception Info: System.AccessViolationException 
Stack: 
    at System.Security.Cryptography.CAPISafe.CertGetCertificateChain(IntPtr, System.Security.Cryptography.SafeCertContextHandle, System.Runtime.InteropServices.ComTypes.FILETIME ByRef, System.Security.Cryptography.SafeCertStoreHandle, CERT_CHAIN_PARA ByRef, UInt32, IntPtr, System.Security.Cryptography.SafeCertChainHandle ByRef) 
    at System.Security.Cryptography.X509Certificates.X509Chain.BuildChain(IntPtr, System.Security.Cryptography.SafeCertContextHandle, System.Security.Cryptography.X509Certificates.X509Certificate2Collection, System.Security.Cryptography.OidCollection, System.Security.Cryptography.OidCollection, System.Security.Cryptography.X509Certificates.X509RevocationMode, System.Security.Cryptography.X509Certificates.X509RevocationFlag, System.DateTime, System.TimeSpan, System.Security.Cryptography.SafeCertChainHandle ByRef) 
    at System.Security.Cryptography.X509Certificates.X509Chain.Build(System.Security.Cryptography.X509Certificates.X509Certificate2) 
    at System.Net.Security.SecureChannel.VerifyRemoteCertificate(System.Net.Security.RemoteCertValidationCallback) 
    at System.Net.Security.SslState.CompleteHandshake() 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(System.Net.Security.ProtocolToken, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.ProcessReceivedBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartReadFrame(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[], System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(System.Net.Security.ProtocolToken, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.ProcessReceivedBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartReadFrame(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[], System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(System.Net.Security.ProtocolToken, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.ProcessReceivedBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartReadFrame(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[], System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(System.Net.Security.ProtocolToken, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.ProcessReceivedBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartReadFrame(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[], System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(System.Net.Security.ProtocolToken, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.ProcessReceivedBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartReadFrame(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartReceiveBlob(Byte[], System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(System.Net.Security.ProtocolToken, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.StartSendBlob(Byte[], Int32, System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.ForceAuthentication(Boolean, Byte[], System.Net.AsyncProtocolRequest) 
    at System.Net.Security.SslState.ProcessAuthentication(System.Net.LazyAsyncResult) 
    at System.Net.TlsStream.CallProcessAuthentication(System.Object) 
    at System.Threading.ExecutionContext.runTryCode(System.Object) 
    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object) 
    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 
    at System.Net.TlsStream.ProcessAuthentication(System.Net.LazyAsyncResult) 
    at System.Net.TlsStream.Write(Byte[], Int32, Int32) 
    at System.Net.PooledStream.Write(Byte[], Int32, Int32) 
    at System.Net.ConnectStream.WriteHeaders(Boolean) 
    at System.Net.HttpWebRequest.EndSubmitRequest() 
    at System.Net.HttpWebRequest.CheckDeferredCallDone(System.Net.ConnectStream) 
    at System.Net.HttpWebRequest.GetResponse() 
    at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(System.Net.WebRequest) 
    at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(System.Net.WebRequest) 
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(System.String, System.Object[]) 
    at {METHOD THAT CALLS WEBSERVICE} 

Web服務通信由服務引用處理。我們嘗試調用哪個Web服務並不重要。當我們使用完全不同的服務器時,甚至發生錯誤。

回答

0

我們剛剛解決了這個問題。似乎只有在構建應用程序的計算機安裝了Visual Studio 2013時纔會出現此問題。

編輯:這是一個錯誤的假設。我們在我們的應用程序中使用libcef,這似乎是問題的根源。在沒有VS2013的機器上構建的版本包含錯誤版本的libcef。如果發生這種情況,應用程序將繼續沒有CEF功能,所以我們假設它正在工作。

+0

我們可以找到解決方案嗎? – bradmo 2015-03-24 18:17:01

+0

@bradmo不幸的是沒有。我們暫時切換到較早版本的CEF。這個問題在2062分支上不會發生。我可以通過打開CEF瀏覽器實例並在應用程序中發出任何請求之前加載頁面來解決此問題。但是,這看起來像一個拙劣的解決方案。 – Name 2015-03-25 16:24:35

相關問題