View current opened netNamedPipe channels?

你离开我真会死。 提交于 2019-12-24 00:02:36

问题


Is there 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.


回答1:


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.




回答2:


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

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




回答3:


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

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



来源:https://stackoverflow.com/questions/7520967/view-current-opened-netnamedpipe-channels

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!