Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
You can use the IWMSIPEntry object to edit an IP address or range of IP addresses in an IWMSIPListIWMSIPList Object (C#). The IWMSIPList object contains a collection of access lists used by the WMS IP Address Authorization plug-in to allow or disallow client connections based on IP addresses.
The IWMSIPEntry object exposes the following properties.
Property |
Description |
|---|---|
Address |
Specifies and retrieves an IP address or range of IP addresses that can be used to allow or disallow client connections. |
Mask |
Specifies and retrieves an IP address mask. |
Example
The following example illustrates how to retrieve an IWMSIPEntry object.
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSIPAdmin IPAdmin;
IWMSIPList IPList;
IWMSIPEntry IPEntry;
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;
// Retrieve the list of banned IP addresses.
IPList = IPAdmin.DisallowIP;
// Retrieve each banned address.
for(int i = 0; i < IPList.Count; i++)
{
IPEntry = IPList[i];
}
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}