有人知道这是什么意思吗?
System.Net.WebException:基础连接已关闭:发送时发生意外错误。-> System.IO.IOException:数据包格式异常导致握手失败。在System.Net.Security.SslState.StartReadFrame(Byte[]缓冲器处,System.Net.Security.SslState.StartReceiveBlob(Byte[]缓冲器处Int32 readBytes,AsyncProtocolRequest asyncRequest)在System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken asyncRequest处,AsyncProtocolRequest asyncRequest)在System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken asyncRequest处,AsyncProtocolRequest asyncRequest)处,Int32计数,AsyncProtocolRequest asyncRequest)在asyncRequest缓冲器,Byte[]缓冲器,在System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult状态)在System.Net.TlsStream.CallProcessAuthentication(Object状态)在System.Threading.ExecutionContext.runTryCode(Object状态)在System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode代码,对象回调( System.Threading.ExecutionContext.RunInternal(ExecutionContext userData)在System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode状态,对象回调,对象状态)在System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,ContextCallback回调,对象状态)在asyncRequest lazyResult,ContextCallback userData,System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult结果时的对象状态) System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan超时时的System.Net.TlsStream.Write(Byte[]缓冲区,Int32偏移量,Int32大小) System.Net.PooledStream.Write(Byte[]缓冲区,Int32偏移量,Int32大小)System.Net.ConnectStream.WriteHeaders(布尔异步)-内部异常堆栈跟踪结束- System.Net.HttpWebRequest.GetResponse()处
编辑:
这是我调用的方法:
_productsService =新建ProductsPortTypeClient();新建GetResortProductParams());
发布于 2011-03-03 18:46:47
这看起来像是SSL认证的问题,它在握手阶段失败了,可能两种实现不兼容,你可以检查响应的WSDL格式,找出应该使用什么格式进行通信,并检查你发送的格式是否符合它(你可以使用任何类型的网络监控软件,例如。Microsoft网络监视器)
发布于 2020-03-31 22:53:19
我只想根据其中一条评论做出回答,因为它可能会导致此错误的发生。
在某些情况下,如果您在调用API
时使用BaseURL
,那么如果您混淆了http
和https
,则可能会出现问题。在我调用Google API
时发生了这种情况。在某些情况下,这是一个简单的修复方法,可能会发生在任何人身上。
希望这能帮上忙的人。
发布于 2016-06-03 17:27:47
在我的例子中,是Skype阻塞了443端口。进入Skype tools-advanced-connections并禁用"Use port 80 & 443 for connections...“
https://stackoverflow.com/questions/5178757
复制相似问题