IWMSAdminAnonUser.AnonymousUserName (C#)
Previous | Next |
IWMSAdminAnonUser.AnonymousUserName (C#)
The AnonymousUserName property retrieves the name of the Windows Media user account that is used to specify access permissions when an anonymous user connects to a Windows Media server.
Syntax
string = IWMSAdminAnonUser.AnonymousUserName;
Property Value
A string containing the name of the Windows user account to use for anonymous connections.
If this property fails, it throws an exception.
Number | Description |
0x8007000E | The server could not allocate memory for the user name. |
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; // Retrieve the user name associated with anonymous // server connections. string UserName = AdminAnonUser.AnonymousUserName; } 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 |