配置.NET程序中最大HTTP并发连接数(默认为2)

方式一:代码

ServicePointManager.DefaultConnectionLimit = 10

方式二:配置

  <system.net>

    <connectionManagement>

      <add address = "http://www.contoso.com" maxconnection = "4" />

      <add address = "*" maxconnection = "2" />

    </connectionManagement>

  </system.net>

 

你可能感兴趣的:(.net)