IWMSAdminAnonUser.IsPasswordSet (Visual Basic .NET)
.gif)
| Previous | Next |
IWMSAdminAnonUser.IsPasswordSet (Visual Basic .NET)
The IsPasswordSet property retrieves a Boolean value indicating whether anonymous user connections to a Windows Media server are password protected.
Syntax
Boolean = IWMSAdminAnonUser.IsPasswordSet
Property Value
A Boolean value indicating whether a password has been associated with anonymous user connections.
Remarks
This property is read-only.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub CheckPasswordSet()
' 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
' Set a new user name and password to be associated
' with anonymous server connections if one does not exist.
If AdminAnonUser.IsPasswordSet = False Then
AdminAnonUser.SetUserNamePassword("NewUserName", "NewPassword")
End If
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 |