WCF客户端无法接收对象
我使用nettcp结合,并在WCF服务成功发送对象,但不能接收(含同一对象的返回类型)的响应,并得到以下错误:WCF客户端无法接收对象
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:02:59.9990000'. System.ServiceModel.CommunicationException
有人遇到过和我一样的问题吗?任何帮助都会有所帮助。
我试图改变WCF从nettcp结合到http,但只有改变错误我收到即
An error occurred while receiving the HTTP response .. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
正如它所说的“见服务器日志以了解更多详细信息”,我回顾了WCF日志并指出在序列化对象时发生错误,我在DataContract上用KnownType属性修饰了该对象的类,并且它工作正常。
你有没有试过改变超时? 3分钟听起来是正常的,但如果你的数据是那么大,它需要更长的时间... – BugFinder
我试着返回一个整数,但也无法这样做,最初超时是40分钟(正在接收相同的错误)。 – FaizanRabbani
然后Id建议需要一个最小可行的可重复代码 – BugFinder