4
votes

The documentation for the maxconnection configuration value in the system.net connectionManagement section of a config file is confusing me. When you use a wildcard in the address - is that limit per host or is that limit shared by all hosts (that are not explicitly listed).

So, to use the example from the documentation itself - but imagining our application calls 3 hosts:

  1. http://www.contoso.com
  2. http://www.example1.com
  3. http://www.example2.com

With a web.config or machine.config section like the following:

<configuration>  
  <system.net>  
    <connectionManagement>  
      <add address="http://www.contoso.com" maxconnection="4" />  
      <add address="*" maxconnection="2" />  
    </connectionManagement>  
  </system.net>  
</configuration>  

Does that mean example1 and example2 have 2 connections to share between them? Or do example1 and example2 get given 2 connections each (4 connections between them)?

Edit: forgot pertinent details - we're using .Net 4.7 ASP.Net MVC 5 (I believe - I'm new to this project)

1

1 Answers

1
votes

It is 2 connections max each for example1.com and example2.com and max 4 connections for contoso.com