System.IO.IOException: 由于意外的 > 握手失败数据包格式? [英] System.IO.IOException: The handshake failed due to an unexpected > packet format?

查看:27
本文介绍了System.IO.IOException: 由于意外的 > 握手失败数据包格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道这是什么意思吗?

Does anyone know what this means?

System.Net.WebException:基础连接已关闭:An发送时发生意外错误.---> System.IO.IOException: 由于意外,握手失败包格式.在System.Net.Security.SslState.StartReadFrame(Byte[]缓冲区,Int32 readBytes,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.StartReceiveBlob(Byte[]缓冲区,异步协议请求异步请求)在System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken消息,异步协议请求异步请求)在System.Net.Security.SslState.StartSendBlob(字节[]传入,Int32 计数,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.ForceAuthentication(Boolean接收第一,字节[]缓冲区,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult懒惰结果)在System.Net.TlsStream.CallProcessAuthentication(对象状态)在System.Threading.ExecutionContext.runTryCode(Object用户数据)在System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode代码,清理代码 backoutCode,对象用户数据)在System.Threading.ExecutionContext.RunInternal(ExecutionContext执行上下文,上下文回调回调,对象状态)在System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,上下文回调回调,对象状态)在System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult结果)在System.Net.TlsStream.Write(字节[]缓冲区、Int32 偏移量、Int32 大小)在System.Net.PooledStream.Write(字节[]缓冲区、Int32 偏移量、Int32 大小)在System.Net.ConnectStream.WriteHeaders(Booleanasync) --- 内部异常结束堆栈跟踪 --- 在System.Net.HttpWebRequest.GetResponse()在System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan超时)在

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: The handshake failed due to an unexpected packet format. at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.TlsStream.CallProcessAuthentication(Object state) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.ConnectStream.WriteHeaders(Boolean async) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at

这是我调用的方法:

_productsService = new ProductsPortTypeClient();_productsService.GetResortProducts(GetProductsCredentials(),GetResortProductParams());

_productsService = new ProductsPortTypeClient(); _productsService.GetResortProducts(GetProductsCredentials(), GetResortProductParams());

推荐答案

看起来是 SSL 认证有问题,握手阶段失败,可能两个实现不兼容,你可以查看响应的 WSDL 格式,如图确定应该使用什么格式进行通信并检查您发送的格式是否符合它(您可以使用任何类型的网络监控软件,例如 Microsoft Network Monitor)

It looks like a problem with SSL authentication, it fails at handshake phase, maybe two implementations are not compatible, you may check the WSDL format of the response, figure out what format should be used for communication and check if the one sent by you complies with it (you may use any kind of a network monitor software, eg. Microsoft Network Monitor)

这篇关于System.IO.IOException: 由于意外的 > 握手失败数据包格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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