开发者

Getting the number of existing connections in WCF

Is it possible to check the number of existing available connections a wcf service has? programmatically?

I want to see if connections to the web servic开发者_StackOverflow社区e were closed properly in the ASP.NET code. thanks


You could check out something like Windows Server AppFabric for that purpose.

In WCF, most of the time, the "connections" are only open very briefly anyway - for as long as a service call lasts. So you can't really go check if there are any connections around - they'll be gone when the call terminates.

You can also check into the WCF performance counters that are available on the server side to keep an eye on the number of concurrent sessions. You can definitely query performance counters from .NET code. The Service Performance Counters offer e.g. a number of instances (of your service class) that are in memory at any given time - that's the number of requests being handled at any given time (which is probably what you could call a "connection" to a WCF service).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜