如何找出与WCF服务的并发连接数?

eri*_*icx 10 .net wcf

我需要确定有多少用户连接到WCF服务.我正在使用NetTcpBinding.

谢谢.

Dan*_*llo 10

WCF服务包括可以使用Windows性能监视器(Perfmon.exe)跟踪的性能计数器.您可以从Windows Server 2003中的"管理工具"启动它.

可以从.config服务文件的诊断部分启用性能计数器,如以下示例配置所示:

<configuration>
  <system.serviceModel>
    <diagnostics performanceCounters="All" /> 
  </system.serviceModel>
</configuration>
Run Code Online (Sandbox Code Playgroud)

您可能需要查看这些文章,它们可以指导您如何使用WCF服务的性能计数器: