IWMSServerLimits.ConnectionRate (C#)

banner art

Previous Next

IWMSServerLimits.ConnectionRate (C#)

The ConnectionRate property specifies and retrieves the maximum rate of client connections permitted by the server.


  .ConnectionRate = int;
int = IWMSServerLimits.ConnectionRate;

Property Value

int containing the maximum number of permitted connections per second.

If this property fails, it throws an exception.

Number Description
0x80070057 int is an invalid argument.


If the parameter is –1, there is no limit on the connection rate. The default value of the parameter is 50.

Example Code

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

    // Retrieve the IWMSServerLimits object for the server.
    ServerLimits = Server.Limits;

    // Retrieve the maximum rate for client connections.
    iValue = ServerLimits.ConnectionRate;

    // Set the maximum rate of client connections.
    ServerLimits.ConnectionRate = 15;
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
catch (Exception e) {
    // TODO: Handle exceptions.


Reference: Add a reference to Microsoft.WindowsMediaServices.

Namespace: Microsoft.WindowsMediaServices.Interop.

Assembly: Microsoft.WindowsMediaServices.dll.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003 family, Windows Server 2008 family.

See Also

Previous Next