为什么 WCF 限制我们每台机器只能打开一次命名管道?
每台机器只打开一次命名管道的原因是什么? .我的意思是这个限制背后的原因是什么?
What is the reason for opening a named pipe only once per machine? .I mean what is the reason behind this restriction?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有对此进行测试,但在单个命名管道上只能打开一个侦听器是有道理的。允许打开管道的两个实例会产生一系列问题,首先:
请记住,允许同一命名管道上的两个侦听器将允许两个完全不同的服务接收相同的消息。根本没有理由允许这种情况发生。
更新
Chris Dickson 指出,允许同一管道上的两个侦听器会产生一个称为 抢注攻击< /a>,欺诈主机可以接收请求并窃取调用者的身份。这是上述第 1 点的衍生。
I haven't tested this but it makes sense that only one listener can be open on a single named pipe. Allowing two instances of the pipe to be open would create a range of issues, to start with:
Keep in mind that allowing two listeners on the same named pipe would allow two completely different services to receive the same messages. There is simply no reason to allow this to happen.
Update
Chris Dickson points out that allowing two listeners on the same pipe creates a security issue known as a squatting attack, where a fraudulent host can receive requests and steal the identity of the caller. This is a ramification of point 1 above.