我一直在使用Org.Mentalis Security Socket Library ,因为我在这里的某个地方读到它非常可靠并且运行良好。
完全没有问题,认证得到验证,连接有效,但当我尝试写入流时,连接很快就断开了。
s.Send(intBytes, 0, intBytes.Length, SocketFlags.None);
[1/10/2016 1:40:34 AM] [STATUS] ex: Org.Mentalis.Security.SecurityException: An error occurs while communicating with the remote host. Org.Mentalis.Security.Ssl.Shared.SslException: An error occurred during the decryption and verification process. at Org.Mentalis.Security.Ssl.Shared.RecordLayer.UnwrapMessage (Org.Mentalis.Security.Ssl.Shared.RecordMessage message) [0x00000] in :0 at Org.Mentalis.Security.Ssl.Shared.RecordLayer.ProcessBytes (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in :0 at Org.Mentalis.Security.Ssl.Shared.SocketController.OnReceive (IAsyncResult ar) [0x00000] in :0 ---> Org.Mentalis.Security.Ssl.Shared.SslException: An error occurred during the decryption and verification process. at Org.Mentalis.Security.Ssl.Shared.RecordLayer.UnwrapMessage (Org.Mentalis.Security.Ssl.Shared.RecordMessage message) [0x00000] in :0 at Org.Mentalis.Security.Ssl.Shared.RecordLayer.ProcessBytes (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in :0 at Org.Mentalis.Security.Ssl.Shared.SocketController.OnReceive (IAsyncResult ar) [0x00000] in :0 --- End of inner exception stack trace --- at Org.Mentalis.Security.Ssl.SecureSocket.EndReceive (IAsyncResult asyncResult) [0x00000] in :0 at 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.
最佳答案
我之前找到了解决方案...它不支持 .Net 3.5 或 2.0
关于c# - Mentalis 安全套接字库连接已关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34700842/