IWMSAdminAnonUser.IsPasswordSet (C#)
.gif)
| Previous | Next |
IWMSAdminAnonUser.IsPasswordSet (C#)
The IsPasswordSet property retrieves a Boolean value indicating whether anonymous user connections to a Windows Media server are password protected.
Syntax
bool = IWMSAdminAnonUser.IsPasswordSet;
Property Value
A bool value indicating whether a password has been associated with anonymous user connections.
Remarks
This property is read-only.
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSAdminAnonUser AdminAnonUser;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the plug-in to be configured.
Plugin = Server.Authenticators[
"WMS Anonymous User Authentication"];
// Retrieve the custom interface of the plug-in.
AdminAnonUser =
(IWMSAdminAnonUser)Plugin.CustomInterface;
// Set a new user name and password to be associated
// with anonymous server connections if one does not exist.
if (AdminAnonUser.IsPasswordSet == false)
AdminAnonUser.SetUserNamePassword("NewUserName", "NewPassword");
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}
Requirements
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 |