WCF Tracing. How I can get the exact reason for closing connection?

前端 未结 6 1162
甜味超标
甜味超标 2021-01-02 04:19

In my WCF service, when trying transfer large data I constantly get an error: The underlying connection was closed: The connection was closed unexpectedly

6条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-02 04:34

    You should get a specific communication exception on the client side. I think that this exception that you're describing is an exception that is thrown after trying to reuse the client after it has faulted.

    Try this:

    1. On the server side config file set includeExceptionDetailInFaults="true"
    2. When you're using the client side don't use the 'using pattern'. Check out this article.

    I don't think you need tracing. Try the above and you'll be able to see the exact communication error.

    Oh, and BTW is your client is Silverlight application? If so then it's a bit more complicated... Check out this article.

提交回复
热议问题