我编写WCF服务并将其托管在Windows服务(自托管)上,并公开method1
和method2
。从这个方法1正常工作,但当我尝试消耗method2
时,它给我一个错误,如
An error occurred while receiving the HTTP response to http://********/*******/service. 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.
当我在 XML 中检查app_tracelog时,有
System.Xml.XmlException: The body of the message cannot be read because it is empty
。
所以有人可以告诉为什么会这样吗?它适用于一种方法而不适用于其他方法。