Compartir a través de


IWMSIPAdmin Object (C#)

The IWMSIPAdmin object is exposed by the WMS IP Address Authorization plug-in, which restricts client access to content based on client IP addresses. You can use the methods in the following table to create IP address lists.

The IWMSIPAdmin object exposes the following properties.

Property

Description

AccessListOptions

Retrieves an enumeration value indicating default access permissions for unspecified IP addresses.

AllowIP

Retrieves an IWMSIPListIWMSIPList Object (C#) containing a collection of IP addresses that a client can use to connect to the server.

DisallowIP

Retrieves an IWMSIPList object containing a collection of IP addresses that a client cannot use to connect to the server.

Example

The following example illustrates how to retrieve an IWMSIPAdmin object.

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

// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSIPAdmin IPAdmin;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the plug-in to be configured.
    Plugin = Server.EventHandlers[
                       "WMS IP Address Authorization"];

    // Retrieve the custom interface of the plug-in.
    IPAdmin = (IWMSIPAdmin)Plugin.CustomInterface;
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

See Also

Concepts

System Plug-ins (C#)