单声道的两个版本接受证书其他不?

时间:2013-03-15 12:25:41

标签: c# ubuntu mono certificate

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

机器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

0 个答案:

没有答案