WCF 和 NetNamedPipeBinding - AVG Antivirus
我们不断有一些客户收到 AVG Antivirus 有关我们应用程序的警告。
我们的应用程序在C#中使用WCF打开了一个标准的NetNamedPipeBinding,只是为了跨进程通信。
我们可以通过某种方式解决这个问题吗?我想知道是否需要设置一些内容来指示 WCF 服务仅位于计算机本地。
现在我们只是在 C# 中设置绑定,如下所示:
var binding = new NetNamedPipeBinding();
binding.MaxReceivedMessageSize = int.MaxValue;
binding.MaxReceivedMessageSize = int.MaxValue;
binding.ReaderQuotas = XmlDictionaryReaderQuotas.Max;
binding.ReceiveTimeout = TimeSpan.MaxValue;
我没有看到其他重要的设置,我们只需使用类似“net.pipe://localhost/OurEndpoint”的地址调用 ServiceHost.AddServiceEndpoint
设置绑定。
我想告诉我们的客户,AVG 就是一个垃圾——他们最好把兔子的脚放进软盘驱动器里,但我的良心不允许我这样做。
We keep having some customers getting a warning from AVG Antivirus about our application.
Our application opens a standard NetNamedPipeBinding with WCF in C#, just for cross-process communication.
Is this something we can workaround in some way? I'm wondering if there is something we need to set to indicate the WCF service is local to the machine only.
Right now we just setup the binding in C# like so:
var binding = new NetNamedPipeBinding();
binding.MaxReceivedMessageSize = int.MaxValue;
binding.MaxReceivedMessageSize = int.MaxValue;
binding.ReaderQuotas = XmlDictionaryReaderQuotas.Max;
binding.ReceiveTimeout = TimeSpan.MaxValue;
I don't see other settings of importance, we just call ServiceHost.AddServiceEndpoint
with an address like "net.pipe://localhost/OurEndpoint" to set the binding.
I would like to tell our customers that AVG is a piece of junk--they'd be better off putting a rabbit's foot in their floppy drive, but my conscience won't let me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这比使用 WCF 稍微复杂一些,但您可以简单地使用 TcpClient 和 TcpListener(在 System.Net.Sockets 中),它们可用于打开实际的 TCP 端口并以这种方式进行通信(确保监听IPAddress.Loopback,而不是 Any,否则您可能会收到防火墙警告)。这是跨平台的(Mono 和 .NET),并且似乎通常可以工作!
This is a bit more complex than using WCF, but you could simply use a TcpClient and a TcpListener (in System.Net.Sockets), which could be used to open up an actual TCP port and communicate that way (make sure to listen on IPAddress.Loopback, not Any, or you might get a firewall warning). This is cross-platform (Mono and .NET), and seems to usually work!
我们从未解决过这个问题,而是坚持使用 WCF。
我们还没有遇到任何其他客户端计算机出现此问题。
We never solved this issue, but stuck with WCF.
We haven't run into any other client machines with this problem.