SiteLimits.MaxBandwidth Property

IIS 7.0

Gets or sets the maximum network bandwidth, in bytes per second, used for IIS 7.

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

public long MaxBandwidth { get; set; }

Property Value

Type: System.Int64

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

Exception Condition

The value is less than MinValue or greater than MaxValue.

You can use the MaxBandwidth property to help prevent overloading a network with IIS 7 traffic.

A valid property value is from 1024 through 4294967295.

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

When you set the MaxBandwidth 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 MaxBandwidth property. If the property value is less than 100000, the example resets MaxBandwidth to 4294967295. This code example is part of a larger example provided for the SiteLimits class.

Return to top