WCF 客户端无法接收对象
WCF client unable to receive object
我正在使用 nettcp 绑定,并在 WCF 服务上成功发送了一个对象,但无法收到响应(包含相同对象的 return 类型)并出现以下错误:
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.
正如它提到的 "See server logs for more details",我查看了 WCF 日志并注意到在序列化对象时发生错误,我用 KnownType[=17 修饰了该对象的 class =] 我的 DataContract 上的属性,它起作用了。
我正在使用 nettcp 绑定,并在 WCF 服务上成功发送了一个对象,但无法收到响应(包含相同对象的 return 类型)并出现以下错误:
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.
正如它提到的 "See server logs for more details",我查看了 WCF 日志并注意到在序列化对象时发生错误,我用 KnownType[=17 修饰了该对象的 class =] 我的 DataContract 上的属性,它起作用了。