对SSPI的调用失败,请参阅内部异常。收到的消息是意外的或格式错误 [英] A call to SSPI failed, see inner exception. The message received was unexpected or badly formatted

查看:1622
本文介绍了对SSPI的调用失败,请参阅内部异常。收到的消息是意外的或格式错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1。我们有Web套接字服务器应用程序(java [Linux] - TLS12)

2. Java客户端应用程序(java客户端库)

3.点网客户端应用程序(Dot net客户端库 - Net 4.5.2)



我们可以通过java客户端库连接到web-socket服务器应用程序,没有任何问题,但我们得到以下异常当我们尝试使用dot net客户端库进行连接时:

1. We have Web-socket Server application (java [Linux] - TLS12)
2. Java Client application(java client library)
3. Dot net client application (Dot net client library - Net 4.5.2)

We are able to connect to web-socket server app through java client library without any issue, But we are getting the following exception when we trying to connect using dot net client library:

Quote:

错误详细信息

对SSPI的调用失败,请参阅内部异常。收到的消息是意外的或格式错误的

Error Details :
"A call to SSPI failed, see inner exception. The message received was unexpected or badly formatted"



堆栈跟踪:

在System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)

在System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)

at SuperSocket.ClientEngine.SslStreamTcpSession.OnAutAuthenticated(IAsyncResult result)



我有什么特里d:



1. System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

2.由于它是在java客户端库中工作,服务器中的证书不应该有任何问题。





请帮忙,先谢谢。


Stack trace :
at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
at SuperSocket.ClientEngine.SslStreamTcpSession.OnAuthenticated(IAsyncResult result)

What I have tried:

1. System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
2. As it is working from the java client library, there should not be any issue with certificate in server.


Pls help, Thanks in advance.

推荐答案

1.更新WebSocket4Net.dll到
1.Updated WebSocket4Net.dll to
0.15.0-beta6





2.更改代码如下



2.Changed code as following

websocket = new WebSocket4Net.WebSocket(URL,
          sslProtocols: SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls,
          customHeaderItems : authorizationHeaderItems);





它对我有用。



It worked for me.


这篇关于对SSPI的调用失败,请参阅内部异常。收到的消息是意外的或格式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆