Management Authentication Providers <providers>


The <providers> element of the <authentication> element specifies authentication providers that the Management Service (WMSVC) uses to authenticate users who connect remotely to sites and applications by using IIS Manager.

Note: The default authentication provider, ConfigurationAuthenticationProvider, uses the IIS Administration.config file to store IIS Manager user credentials for IIS Manager.


Version Notes
IIS 7.5 The <providers> element was not modified in IIS 7.5.
IIS 7.0 The <providers> element of the <authentication> element was introduced in IIS 7.0.
IIS 6.0 N/A


The default installation of IIS 7 does not include the Management Service role service. To install this role service, use the following steps.

Windows Server 2008 or Windows Server 2008 R2

  1. On the taskbar, click Start, point to Administrative Tools, and then click Server Manager.
  2. In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS).
  3. In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services.
  4. On the Select Role Services page of the Add Role Services Wizard, select Management Service, and then click Next.

  5. On the Confirm Installation Selections page, click Install.
  6. On the Results page, click Close.

Windows Vista or Windows 7

  1. On the taskbar, click Start, and then click Control Panel.
  2. In Control Panel, click Programs and Features, and then click Turn Windows Features on or off.
  3. Expand Internet Information Services, then Web Management Tool.
  4. Select IIS Management Service, and then click OK.

How To

There is no user interface for configuring the <providers> element of the <authentication> element for IIS 7. For examples of how to configure the <providers> element of the <authentication> element programmatically, see the Code Samples section of this document.




Child Elements

Element Description
add Optional element.

Adds a provider to the collection of authentication providers.

Configuration Sample

The following default <providers> element under the <authentication> element is configured in the Administration.config file in IIS 7 when the Management Service role service is installed.

<authentication defaultProvider="ConfigurationAuthenticationProvider">
      <add name="ConfigurationAuthenticationProvider"
         type="Microsoft.Web.Management.Server.ConfigurationAuthenticationProvider, Microsoft.Web.Management, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

Sample Code

Note: The examples in this document illustrate using a managed-code assembly that has been stored in the .NET Global Assembly Cache (GAC). Before using the code in these examples to deploy your own assemblies, you need to retrieve the assembly information from the GAC. To do so, use the following steps:

  • In Windows Explorer, open your C:\Windows\assembly path, where C: is your operating system drive.
  • Locate your assembly.
  • Right-click the assembly and click Properties.
  • Copy the Culture value; for example: Neutral.
  • Copy the Version number; for example:
  • Copy the Public Key Token value; for example: 426f62526f636b73.
  • Click Cancel.

The following code examples add an authentication provider named ContosoAuthenticationProvider to the collection of management authentication providers, and set the default authentication provider to ContosoAuthenticationProvider.


Note: You cannot configure <system.webServer/Management> settings using AppCmd.exe.


using System;
using System.Text;
using Microsoft.Web.Administration;

internal static class Sample
   private static void Main()
      using (ServerManager serverManager = new ServerManager())
         Configuration config = serverManager.GetAdministrationConfiguration();

         ConfigurationSection authenticationSection = config.GetSection("system.webServer/management/authentication");
         ConfigurationElementCollection providersCollection = authenticationSection.GetCollection("providers");
         ConfigurationElement addElement = providersCollection.CreateElement("add");
         addElement["name"] = @"ContosoAuthenticationProvider";
         addElement["type"] = @"Contoso.Provider, System.Web, Version=, Culture=neutral, PublicKeyToken=426f62526f636b73";
         authenticationSection["defaultProvider"] = "ContosoAuthenticationProvider";



Imports System
Imports System.Text
Imports Microsoft.Web.Administration

Module Sample

   Sub Main()
      Dim serverManager As ServerManager = New ServerManager
      Dim config As Configuration = serverManager.GetAdministrationConfiguration

      Dim authenticationSection As ConfigurationSection = config.GetSection("system.webServer/management/authentication")
      Dim providersCollection As ConfigurationElementCollection = authenticationSection.GetCollection("providers")
      Dim addElement As ConfigurationElement = providersCollection.CreateElement("add")
      addElement("name") = "ContosoAuthenticationProvider"
      addElement("type") = "Contoso.Provider, System.Web, Version=, Culture=neutral, PublicKeyToken=426f62526f636b73"
      authenticationSection("defaultProvider") = "ContosoAuthenticationProvider"

   End Sub

End Module


var adminManager = new ActiveXObject("Microsoft.ApplicationHost.WritableAdminManager"); 
adminManager.CommitPath = "MACHINE/WEBROOT"; 
adminManager.SetMetadata("pathMapper", "AdministrationConfig");

var authenticationSection = adminManager.GetAdminSection("system.webServer/management/authentication", "MACHINE/WEBROOT"); 
var providersCollection = authenticationSection.ChildElements.Item("providers").Collection;

var addElement = providersCollection.CreateNewElement("add");
addElement.Properties.Item("name").Value = "ContosoAuthenticationProvider";
addElement.Properties.Item("type").Value = "Contoso.Provider, System.Web, Version=, Culture=neutral, PublicKeyToken=426f62526f636b73";
authenticationSection.Properties.Item("defaultProvider").Value = "ContosoAuthenticationProvider";



Set adminManager = WScript.CreateObject("Microsoft.ApplicationHost.WritableAdminManager")
adminManager.CommitPath = "MACHINE/WEBROOT"
adminManager.SetMetadata "pathMapper", "AdministrationConfig"

Set authenticationSection = adminManager.GetAdminSection("system.webServer/management/authentication", "MACHINE/WEBROOT")
Set providersCollection = authenticationSection.ChildElements.Item("providers").Collection

Set addElement = providersCollection.CreateNewElement("add")
addElement.Properties.Item("name").Value = "ContosoAuthenticationProvider"
addElement.Properties.Item("type").Value = "Contoso.Provider, System.Web, Version=, Culture=neutral, PublicKeyToken=426f62526f636b73"
authenticationSection.Properties.Item("defaultProvider").Value = "ContosoAuthenticationProvider"

Deprecated Elements