IWMSIPAdmin Object (Visual Basic .NET)
The IWMSIPAdmin object is exposed by the WMS IP Address Authorization plug-in that enables restricted client access to content based on their 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 (Visual Basic .NET) 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.
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub RetrieveObj()
' Declare variables.
Dim Server As WMSServer
Dim Plugin As IWMSPlugin
Dim IPAdmin As IWMSIPAdmin
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve the plug-in to be configured.
Plugin = Server.EventHandlers.Item("WMS IP Address Authorization")
' Retrieve the custom interface of the plug-in.
IPAdmin = Plugin.CustomInterface
Catch excCom As COMException
' TODO: Handle COM exceptions.
Catch exc As Exception
' TODO: Handle errors.
Finally
' TODO: Clean-up code goes here.
End Try
End Sub