博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
System.ServiceModel.CommunicationException: 接收HTTP 响应时发生错误
阅读量:7041 次
发布时间:2019-06-28

本文共 2241 字,大约阅读时间需要 7 分钟。

具体错误信息如下:

System.ServiceModel.CommunicationException: 接收对 http://110.110.110.110/TestService/TestService.svc 的 HTTP 响应时发生错误。这可能是由于服务终结点绑定未使用 HTTP 协议造成的。这还可能是由于服务器中止了 HTTP 请求上下文(可能由于服务关闭)所致。有关详细信息,请参见服务器日志。 ---> System.Net.WebException: 基础连接已经关闭: 接收时发生错误。 ---> System.IO.IOException: 无法从传输连接中读取数据: 远程主机强迫关闭了一个现有的连接。。 ---> System.Net.Sockets.SocketException: 远程主机强迫关闭了一个现有的连接。   在 System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)   在 System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)   --- 内部异常堆栈跟踪的结尾 ---   在 System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)   在 System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)   在 System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)   --- 内部异常堆栈跟踪的结尾 ---   在 System.Net.HttpWebRequest.GetResponse()   在 System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)   --- 内部异常堆栈跟踪的结尾 ---Server stack trace:    在 System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)   在 System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)   在 System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)   在 System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)   在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)   在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)   在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)Exception rethrown at [0]:    在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)   在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)   //部分出错函数信息提示

错误原因:

       通过WCF来传递DataTable

解决:

        WCF中传递的DataTable替换成Dataset(已验证)

或者(未验证)

图片资料来源:

 

 

你可能感兴趣的文章
## mysqldump 导出数据库各参数详细说明
查看>>
java中URL编码和中文相互转换
查看>>
影评:《云图》:生命并非微不足道
查看>>
hibernate4之一对一关系映射(二)
查看>>
我的友情链接
查看>>
Android第五课 编译错误分析
查看>>
VS_远程调试
查看>>
博为峰Java技术题 ——JavaSE Java实现在不同编码之间进行文件转换
查看>>
Throws与Throw
查看>>
php趣味编程 - php求黑色星期五
查看>>
zabbix安装
查看>>
ELK之权限管理
查看>>
×_7_12_2013 I: Light on or off
查看>>
JIT
查看>>
巧用escalations限制Nagios报警次数 - [Nagios
查看>>
Entity SQL与LINQ TO Entity的本质区别
查看>>
python unittest 深入failfast及实际应用【示例】
查看>>
MSSQL中文排序规则设置
查看>>
30 个有关 Python 的小技巧
查看>>
CDN下nginx获取用户真实IP地址
查看>>