问题标签 [netnamedpipebinding]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1392 浏览

wcf - 带有 netNamedPipeBinding 的 WCF 性能不佳

我正在使用带有 netNamedPipeBinding 的 WCF 服务将大量数据(非常长的对象列表)传输到客户端(当然,它在同一台机器上)。问题是整个调用需要大约 20 秒来传输约 250MB 的数据,即每秒大约 10+MB。我预计共享内存时传输速率会快得多。有谁知道如何提高我的性能和传输率?这是我的 app.config 文件:

非常感谢!

0 投票
1 回答
753 浏览

c# - 与 WCF 的可重入双工通信

我有一个 C# 程序,它将有多个需要相互通信、执行命令和来回发送数据的实例。现在,这是使用 WM_COPYDATA 完成的,这很麻烦。我想将它升级到使用 NetNamedPipeBindings 的 WCF 系统。但是,无论我尝试什么设置,我都无法使可重入双工通信正常工作。

这将是一个正常的 WCF 调用:

这就是我想要的:

至关重要的是,我希望调用 proxy.foo 的客户端线程与调用 proxy.baz 的线程相同。对于 Windows 消息,这是课程的标准。但无论我尝试什么设置,我都无法通过 WCF 获得这种模式。甚至可能吗?

0 投票
2 回答
1829 浏览

wcf - WCF pipe connection aborted due to error #109

I am designing a WCF service and client with callback using named pipe, when the server process the request from the client, I got the error#109 and eventually the pipe connection got aborted. Below is the tracing file from the server side. In case the font is too small to see, I should simply explain it:

The three exception marked in red happened when the request made from the client to the server. The function is pretty simple, is passes one string variable to the server. This error is #109 (3 consecutive exceptions, if that number means anything) and it doesn't give more information. And in this activity the pipe connection eventually got aborted. Also what's weird is we can see the next activity after the "Receive bytes on connection...", the "Processing message", it actually went through, meaning the server side processing did get called with the passed parameter. This can be verified in the debugger because on the server side the operation did get the passing string. Also inside the operation function if I try

It actually goes into the If sentence, which I guess means the channel is actually alive so far.

Thanks for any help!

Tracing details

0 投票
2 回答
3158 浏览

wcf - WCF 管道连接因错误而中止:从管道读取错误:无法识别的错误 109

我正在使用命名管道绑定设计带有回调的 WCF 服务。当我从客户端调用服务时,在服务器端跟踪它显示错误“从管道读取错误:无法识别的错误 109”,最终管道连接中止。但我完全不知道是什么导致了这个问题。除了堆栈跟踪之外,跟踪没有提供更多信息:

以及堆栈跟踪的另一个 109 错误

我怀疑这与基于跟踪活动流的操作的返回值有关。但即使我将操作的返回类型声明为 void,我仍然会收到此错误。另一件事是虽然我使用了回调,但它并没有在操作内部调用回调。

任何帮助将不胜感激,或指导我如何调试管道连接中止,我敢打赌有一些方法可以获得更详细的信息。例如如何捕获上面提到的异常(服务器操作中的try catch块没有得到任何东西,客户端调用函数也没有)。

0 投票
2 回答
3854 浏览

.net - 尝试“启动”Windows 服务时出现错误

我正在按照 John Sharp 的“Windows Communication Foundation 4”中的示例进行操作。第 88-89 页显示了如何注册和启动服务。我的服务没有启动。

我需要说我无法在我自己的主机中使用 net.tcp 运行该服务,因为它抱怨端口被占用,而这个应该使用 namedPipes。

应用程序日志中的错误是

非常感谢您的帮助。

0 投票
0 回答
1797 浏览

wcf - WCF 命名管道:流式处理(配置)问题

我正在构建一个 WCF 服务,以使用命名管道在两个进程之间传输大文件(~8 Gig)。

我已经有了以流模式传输小文件的概念。虽然对于较大的文件,我必须增加 maxReceivedMessageSize。我可以毫无问题地在主机 app.config 中指定 bindingConfiguration。

当我在客户端 app.config 的客户端端点中指定 bindingConfiguration 时,会出现问题。

我得到的错误信息:

'net.pipe://localhost/MyService' 不支持正在使用的 .Net 框架模式。有关更多详细信息,请参阅服务器日志。

不支持成帧模式 Singleton。

主机配置:

客户端配置:

0 投票
1 回答
1446 浏览

wcf - WCF NetNamedPipeBinding 延迟通道打开

我目前正在开发一个具有 SOA 架构的应用程序,服务公开为 WCF 服务(.Net 4.0),托管在 Windows Server 2008 R2 Datacenter x64 VM 上的 IIS 7.5 中(它实际上是 Amazon EC2 上的 m1.small 实例)。这些服务在机器上本地相互通信,因此我已将它们设置为使用 netNamedPipeBinding 以获得最佳性能。实例化模式是每次调用,并发设置为多个。

目前我遇到了两个问题,即在打开 200 毫秒到 1 秒之间的通道时出现间歇性延迟,这是不可接受的,因为正常速度似乎约为 2 毫秒。

我启用了 WCF 跟踪,我看到延迟表现为以下错误:

System.IO.PipeException:写入管道时出错:管道正在关闭。(232, 0xe8)。

之后它出现 WCF 重试并成功连接(因此延迟)。第二个症状是执行活动时延迟半秒:

处理操作“http://tempuri.org/IConnectionRegister/ValidateUriRoute”

我唯一能找到的就是有些人认为它可能与 TCP 端口共享有关,但我使用的是命名管道。我尝试禁用 TCP 端口共享服务,但这没有任何区别。

出于兴趣,我还尝试将所有端点更改为使用 net.tcp 在同一随机端口上的 localhost 上侦听,并且ValidateUriRoute活动中的半秒延迟仍然间歇性地发生。

我的 WCF 配置与此类似:

0 投票
1 回答
5431 浏览

c# - NetNamedPipeBinding 安全吗?

我想知道 netNamedPipeBinding 是否被认为是安全的:

一方面,NetNamedPipeBinding 仅在传输层上实现安全性,并且它使用Microsoft 不再推荐的NTLM(源)(

另一方面,命名 Pipie 无法从远程计算机访问,并且无法窃听用于传输数据或向其写入数据的特定开放管道实例,除非可以获得特定实例的句柄担心的。

这就是为什么我不知道如何看待这个解决方案的安全性的原因。

0 投票
2 回答
1839 浏览

c# - C# 和 C++ 之间的 NetNamedPipeBinding

我已经看到 NetNamedPipeBinding 存在于 C# 和 C++ ( source ) 中,我想知道是否可以使用它在 C++ 程序和 C# 应用程序之间传输数据?

0 投票
1 回答
207 浏览

c# - 如何保护 NetNamed Pipe 绑定?

我如何能够控制命名管道端点的安全性,端点应该只能由运行 IIS 应用程序池的登录名和本地计算机上的管理员组访问?

我遵循了这一点并创建了必要的自定义绑定:http: //blogs.charteris.com/blogs/chrisdi/archive/2008/06/23/exploring-the-wcf-named-pipe-binding-part-3.aspx

我想知道如何实现 IIS 应用程序池部分。