开发者

View current opened netNamedPipe channels?

开发者 https://www.devze.com 2023-04-06 16:01 出处:网络
Is t开发者_StackOverflowhere any way I can determine which netNamedpipe channels are currently open? This will help me debug my WCF Client/Server and make sure I am closing my channels properly.

Is t开发者_StackOverflowhere any way I can determine which netNamedpipe channels are currently open? This will help me debug my WCF Client/Server and make sure I am closing my channels properly.

This is similar to the netstat tool for network connections, but for netNamedPipes instead.


There is no tool to do this, as far as I am aware.

You can use Process Explorer to find what handles to named pipe objects a process is holding, but this will not really answer your question. To recognise pipes which are created for WCF NetNamedPipeBinding channels you need to know what you are looking for. WCF pipes will incorporate a GUID in their name, looking something like this:

\\.\pipe\197ad019-6e5f-48cb-8f88-02ae11dfd8c0

See here for more on this.

However, the fact that a handle exists doesn't per se tell you anything about the state of the channel. There is a WCF pooling mechanism for pipe connections, so even if the channel is properly closed this does not guarantee that the pipe connection itself has been dropped and the handle released (though if you were to see a process gradually acquiring more and more handles that would suggest there might be a problem with channel cleanup).

If you want to confirm that channels are being cleaned-up promptly I would suggest you enable WCF Tracing in verbose mode: this will tell you exactly what is going on.


You can use Process Explorer to see what pipes a process has open:

http://technet.microsoft.com/en-us/sysinternals/bb896653


SysInternals has a command called PipeList. I believe you can download the command separately here:

http://technet.microsoft.com/en-us/sysinternals/dd581625

0

精彩评论

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

关注公众号