SiteLimits.MaxConnections Property

IIS 7.0
 

Gets or sets the maximum number of simultaneous connections to a server.

Namespace:   Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)

public long MaxConnections { get; set; }

Property Value

Type: System.Int64

A valid value from UInt32.MinValue through UInt32.MaxValue. The default is 4294967295.

Exception Condition
ArgumentOutOfRangeException

The value is less than MinValue or greater than MaxValue.

You can see and modify the MaxConnections property in the Advanced Settings dialog box in IIS Manager.

When you set the MaxConnections property, you need to call the ServerManager.CommitChanges method to persist the change to the ApplicationHost.config file.

The following example checks the value of the MaxConnections property. If the property value is less than 100, the example resets MaxConnections to 150. This code example is part of a larger example provided for the SiteLimits class.

Return to top
Show: