如何调试与多个客户端连接的 WCF 服务 - .NET
我编写了一个带有双工合约的 WCF 服务,该合约异步回调客户端。当多个客户端连接时,我遇到一些问题,并且我不知道如何调试服务。对此有什么见解吗?
谢谢。
自然LV
I've written a WCF service with a duplex contract which asynchronously calls back the clients. I have some issues when multiple clients get connected and i dono how to debug the service. Any insights on this?
Thank you.
NLV
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有关您的问题的更多信息会有所帮助,但要让您开始尝试启用诊断。将以下内容添加到您的服务配置中并设置“initializeData”以设置日志文件的写入位置。打开该文件应启动 Microsoft 服务跟踪查看器。您可以在客户端执行相同的操作。如果您在跟踪查看器中同时有服务日志和客户端日志,请转到菜单 ->添加并选择其他文件。然后,您将在图表选项卡中获得匹配的消息交互。
更多信息请参见:跟踪
A bit more info on what your problem is would be helpful, but to get you started try enabling diagnostics. Add the following to your service config and set "initializeData" to set where the log file is written. Opening the file should launch Microsoft Service Trace Viewer. You can do the same on the client side. If you have both a service log and client log in Trace Viewer go to Menu -> Add and select the other file. You will then get the message interactions matched up in the graph tab.
More info here: Tracing