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.

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.




The server could not allocate memory for the user name.


This property is read-only.


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 =

    // 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.


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


IWMSAdminAnonUser Object (C#)