Export (0) Print
Expand All

AuthenticationManager.RegisteredModules Property

Gets a list of authentication modules that are registered with the authentication manager.

Namespace:  System.Net
Assembly:  System (in System.dll)

'Declaration
Public Shared ReadOnly Property RegisteredModules As IEnumerator

Property Value

Type: System.Collections.IEnumerator
An IEnumerator that enables the registered authentication modules to be read.

The RegisteredModules property provides an IEnumerator instance that enables the list of registered authentication modules to be read. The Register method adds modules to the list, and the Unregister method removes modules from it.

The following example uses the RegisteredModules property to get a list of authentication modules that are registered with the authentication manager. For a complete example, refer to the AuthenticationManager class.

      ' Display registered authentication modules. 
      Private Shared Sub displayRegisteredModules()
        ' The AuthenticationManager calls all authentication modules sequentially  
        ' until one of them responds with an authorization instance.  Show 
        ' the current registered modules. 
        Dim registeredModules As IEnumerator = AuthenticationManager.RegisteredModules
        Console.WriteLine(ControlChars.Cr + ControlChars.Lf + "The following authentication modules are now registered with the system:")
        While registeredModules.MoveNext()
          Console.WriteLine(ControlChars.Cr + " " + ControlChars.Lf + " Module : {0}", registeredModules.Current)
          Dim currentAuthenticationModule As IAuthenticationModule = CType(registeredModules.Current, IAuthenticationModule)
          Console.WriteLine(ControlChars.Tab + "  CanPreAuthenticate : {0}", currentAuthenticationModule.CanPreAuthenticate)
        End While 
      End Sub 'displayRegisteredModules 

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft