1

我有两台机器,每台都运行不同版本的单声道:

机器 1:Mono JIT 编译器版本 2.10.5 (Debian 2.10.5-1ubuntu0.1) 机器 2:Mono JIT 编译器版本 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2)

我决定使用 允许所有证书ServicePointManager.ServerCertificateValidationCallback = Validator;,其中Validator是:

public bool Validator (object sender, X509Certificate certificate, X509Chain chain,     SslPolicyErrors sslPolicyErrors)
{
    return true;
}

机器 1 运行良好并接受证书

但是机器 2 抛出了一个大错误,我认为这可能是一个证书问题

有任何想法吗?

大错误:

Unhandled Exception: System.Net.WebException: Error getting response
stream (ReadDone1): ReceiveFailure ---> System.IO.IOException: EndRead
failure ---> System.Net.Sockets.SocketException: Connection reset by
peer   at System.Net.Sockets.Socket.EndReceive (IAsyncResult result)
[0x00000] in <filename unknown>:0    at
System.Net.Sockets.NetworkStream.EndRead (IAsyncResult ar) [0x00000]
in <filename unknown>:0    --- End of inner exception stack trace --- 
at System.Net.Sockets.NetworkStream.EndRead (IAsyncResult ar)
[0x00000] in <filename unknown>:0    at
Mono.Security.Protocol.Tls.SslStreamBase.InternalReadCallback
(IAsyncResult result) [0x00000] in <filename unknown>:0    --- End of
inner exception stack trace ---   at
System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
[0x00000] in <filename unknown>:0    at
System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename
unknown>:0    at CRMOnlineSOAPRequests.CRMHelper.GetSOAPResponse
(System.String url, System.String soapEnvelope) [0x00000] in <filename
unknown>:0    at CRMOnlineSOAPRequests.CRMHelper.createEntity
(System.String[] keyValuesOneDimensionalArray) [0x00000] in <filename
unknown>:0    at CRMCreateEntity.Program.Main (System.String[]
keyValuesOneDimensionalArray) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.Net.WebException: Error
getting response stream (ReadDone1): ReceiveFailure --->
System.IO.IOException: EndRead failure --->
System.Net.Sockets.SocketException: Connection reset by peer   at
System.Net.Sockets.Socket.EndReceive (IAsyncResult result) [0x00000]
in <filename unknown>:0    at System.Net.Sockets.NetworkStream.EndRead
(IAsyncResult ar) [0x00000] in <filename unknown>:0    --- End of
inner exception stack trace ---   at
System.Net.Sockets.NetworkStream.EndRead (IAsyncResult ar) [0x00000]
in <filename unknown>:0    at
Mono.Security.Protocol.Tls.SslStreamBase.InternalReadCallback
(IAsyncResult result) [0x00000] in <filename unknown>:0    --- End of
inner exception stack trace ---   at
System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
[0x00000] in <filename unknown>:0    at
System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename
unknown>:0    at CRMOnlineSOAPRequests.CRMHelper.GetSOAPResponse
(System.String url, System.String soapEnvelope) [0x00000] in <filename
unknown>:0    at CRMOnlineSOAPRequests.CRMHelper.createEntity
(System.String[] keyValuesOneDimensionalArray) [0x00000] in <filename
unknown>:0    at CRMCreateEntity.Program.Main (System.String[]
keyValuesOneDimensionalArray) [0x00000] in <filename unknown>:0
4

0 回答 0