Mentalis安全套接字库连接已关闭

时间:2016-01-10 00:59:51

标签: c# security ssl

我一直在使用Org.Mentalis Security Socket Library,因为我在这里读到它非常可靠并且效果很好。

没有任何问题,认证得到验证,连接正常,但当我尝试写入流时,连接很快就会死亡。

s.Send(intBytes, 0, intBytes.Length, SocketFlags.None);
  

[1/10/2016 1:40:34 AM] [状态]例如:Org.Mentalis.Security.SecurityException:与远程主机通信时发生错误。   Org.Mentalis.Security.Ssl.Shared.SslException:解密和验证过程中发生错误。     在Org.Mentalis.Security.Ssl.Shared.RecordLayer.UnwrapMessage(Org.Mentalis.Security.Ssl.Shared.RecordMessage message)[0x00000] in:0     在Org.Mentalis.Security.Ssl.Shared.RecordLayer.ProcessBytes(System.Byte [] buffer,Int32 offset,Int32 size)[0x00000] in:0     在Org.Mentalis.Security.Ssl.Shared.SocketController.OnReceive(IAsyncResult ar)[0x00000] in:0 ---> Org.Mentalis.Security.Ssl.Shared.SslException:解密和验证过程中发生错误。     在Org.Mentalis.Security.Ssl.Shared.RecordLayer.UnwrapMessage(Org.Mentalis.Security.Ssl.Shared.RecordMessage message)[0x00000] in:0     在Org.Mentalis.Security.Ssl.Shared.RecordLayer.ProcessBytes(System.Byte [] buffer,Int32 offset,Int32 size)[0x00000] in:0     在Org.Mentalis.Security.Ssl.Shared.SocketController.OnReceive(IAsyncResult ar)[0x00000] in:0     ---内部异常堆栈跟踪结束---     在Org.Mentalis.Security.Ssl.SecureSocket.EndReceive(IAsyncResult asyncResult)[0x00000] in:0     在Org.Mentalis.Security.Ssl.SecureSocket.Receive(System.Byte [] buffer,Int32 offset,Int32 size,SocketFlags socketFlags)[0x00000] in:0

之前有没有人遇到过这个问题?

The error throw is over here, but I don't exactly know what is that.

1 个答案:

答案 0 :(得分:0)

我之前找到了解决方案......它不支持.Net 3.5或2.0