Share via


IWMSAdminAnonUser Object (Visual Basic .NET)

banner art

Previous Next

IWMSAdminAnonUser Object (Visual Basic .NET)

When you enable the WMS Anonymous User Authentication plug-in, a client can attempt to connect to the server without providing a user name or password. The client is granted the access permissions specified for an account that Windows Media Services has been configured to use as the anonymous user account. You can use the IWMSAdminAnonUser object to retrieve the name of the user account and specify a user name and password for use during the authorization process. The IWMSAdminAnonUser object exposes the following properties and methods.

Property Description
AnonymousUserName 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.
IsPasswordSet Retrieves a Boolean value indicating whether a password has been associated with anonymous user connections.
Method Description
SetUserNamePassword Specifies a user name and password for the authorization process.

Example Code

The following example illustrates how to retrieve an IWMSAdminAnonUser object.

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

Private Sub RetrieveObj()

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

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

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

See Also

Previous Next