c# – WCF listenBacklog和maxConnections不能设置为高于10.为什么不?

我的服务在低负载下工作得很好.但是在高负载下,我开始得到连接错误.

我知道其他设置,但我正在尝试更改listenBacklog参数,特别是对于我的TCP缓冲绑定.

如果我设置listenBacklog =“10”,我可以telnet到我的WCF服务正在运行的端口.

如果我将listenBacklog更改为高于10的任何内容,它将不会让我在运行时telnet进我的服务.

没有错误似乎被抛出.

我能做什么?
当我将maxConnections从10更改时,我遇到同样的问题.绑定的所有其他属性我可以设置更高没有问题.

这是我的约束力:

<bindings>
  <netTcpBinding>
<binding name="NetTcpBinding_IMyService" closeTimeout="00:01:00"
  openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
  transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
  hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288"
  maxBufferSize="1048576" maxConnections="10" maxReceivedMessageSize="1048576">
  <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
    maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNaMetableCharCount="2147483647" />
  <reliableSession ordered="true" inactivityTimeout="00:10:00"
    enabled="false" />
  <security mode="Transport">
    <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign">
    </transport>
    <message clientCredentialType="Windows" />
  </security>
</binding>
...

我真的需要增加maxConnections和listenBacklog的值

解决方法

如果您在Win2000,XP,Vista或Win7机器上运行,则操作系统将限制您进行10个并发TCP连接.尝试在Windows Server计算机上运行以确认.

相关文章

在要实现单例模式的类当中添加如下代码:实例化的时候:frmC...
1、如果制作圆角窗体,窗体先继承DOTNETBAR的:public parti...
根据网上资料,自己很粗略的实现了一个winform搜索提示,但是...
近期在做DSOFramer这个控件,打算自己弄一个自定义控件来封装...
今天玩了一把WMI,查询了一下电脑的硬件信息,感觉很多代码都...
最近在研究WinWordControl这个控件,因为上级要求在系统里,...