IWMSAdminAnonUser.AnonymousUserName (Visual Basic .NET)

banner art

Previous Next

IWMSAdminAnonUser.AnonymousUserName (Visual Basic .NET)

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

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub GetAnonUserName()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Plugin As IWMSPlugin
    Dim AdminAnonUser As IWMSAdminAnonUser
    Dim UserName As String

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the plug-in to be configured.
    Plugin = Server.Authenticators.Item( _
         "WMS Anonymous User Authentication")

    ' Retrieve the custom interface of the plug-in.
    AdminAnonUser = Plugin.CustomInterface

    ' Retrieve the user name associated with anonymous
    ' server connections.
    UserName = AdminAnonUser.AnonymousUserName

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

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