请教一下WCF配置参数中maxConcurrentSessions与maxConnections的意思
按MSDN的解释maxConnections取或设置一个值,该值控制客户端上可存入池中以备后续重复使用的最大连接数,以及服务器上可挂起调度的最大连接数。maxConcurrentSessions个正整数,用于限制 ServiceHost 对象可以接受的会话数。 
此服务将接受超出限制的连接,但是,只有处于限制范围之内的通道处于活动状态(会从此通道中读取消息)。将此值设置为 0 与将其设置为 Int32.MaxValue 等效。默认值为 10有点把这个概念搞模糊了,哪位能举例说一下谢谢另外,为什么我把maxConnections改为10以下服务就没法启动呢,报已有针对 IP 终结点 127.0.0.1:8730 的侦听器。请确保没有在应用程序中多次尝试使用此终结点,也没有其他应用程序在侦听此终结点。 ---> System.Net.Sockets.SocketException: 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。

解决方案 »

  1.   

    这两个端口一样导致,建议把其中一个改掉.    
     <service behaviorConfiguration="MyBehavior" name="WcfService.ServerService">
            <host>
              <baseAddresses>
                <add baseAddress="net.tcp://localhost:8888"/>
              </baseAddresses>
            </host>
            <endpoint address="" binding="netTcpBinding" contract="WcfService.IServerWcf" bindingConfiguration="netTcpBindConfig"></endpoint>
            <endpoint address="net.tcp://localhost:8880" binding="mexTcpBinding" contract="IMetadataExchange" ></endpoint>
          </service>     </services>