Specify Whether to Use Client Certificates (IIS 7)
Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista
You must first configure a Server Certificate and create an HTTPS binding to enable any Secure Sockets Layer (SSL) Settings. When you want clients to verify their identity before they access content on your Web server, configure client certificates. By default, client certificates are ignored.
If you want all clients to verify their identity, you must specify that client certificates are required. If some clients can access content without first verifying their identity, you must specify that client certificates are accepted.
For information about the levels at which you can perform this procedure, and the modules, handlers, and permissions that are required to perform this procedure, see Secure Sockets Layer Feature Requirements (IIS 7).
Exceptions to Feature Requirements
You can perform this procedure by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts.
Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7).
In Features View, double-click SSL Settings.
Make sure that you are at the site, application, or directory level; SSL Settings are not available at the Server level. To enable client certificates at the file level, navigate to the file in Content View and then click Switch to Features View in the Actions pane.
On the SSL Settings page, optionally select Require SSL. You do not need SSL to Ignore or Accept client certificates.
On the SSL Settings page, in the Client certificates area, use one of the following procedures:
Select Ignore if you do not want to accept a client certificate even if a client presents one.
Select Accept to accept client certificates.
Select Require to require client certificates. To use Require Client Certificates, you must enable Require SSL.
- Select Ignore if you do not want to accept a client certificate even if a client presents one.
In the Actions pane, click Apply.
To specify whether to use client certificates, use the following syntax:
appcmd set config " site | URL "/section: access /sslFlags: Ssl | SslNegotiateCert | SslRequireCert /commit:APPHOST
The variable site | URL is the site, application, virtual directory, or file where you want IIS to enable client certificates. For example, to accept client certificates for the Default Web Site, type the following at the command prompt, and then press ENTER:
appcmd set config " Default Web Site "/section: access /sslFlags:SslNegotiateCert /commit:APPHOST
To accept client certificates for the file iisstart.htm on the Default Web Site, type the following at the command prompt, and then press ENTER:
appcmd set config " http://localhost/iisstart.htm "/section: access /sslFlags:SslNegotiateCert /commit:APPHOST
You can specify one or more of the values for the sslFlags attribute. If you want more than one value, separate each value with a comma (,). For example, to specify a requirement for both SSL and client certificates on the Default Web Site, type the following at the command prompt, and then press ENTER:
appcmd set config " Default Web Site "/section: access /sslFlags:Ssl,SslRequireCert /commit:APPHOST
|When you use Appcmd.exe to configure the access element at the site, application, virtual directory, or file level in IIS 7, you must specify /commit:APPHOST in the command so that configuration changes are made to ApplicationHost.config with an appropriate location tag.|
For more information about Appcmd.exe, see Appcmd.exe (IIS 7).
The procedure in this topic affects the following configuration elements:
<access> under <security> under <system.webServer>
For more information about IIS 7 configuration, see IIS 7.0: IIS Settings Schema on MSDN.
Use the following WMI classes, methods, or properties to perform this procedure:
AccessSection.SSLFlags property (SSLRequireCert flag)
For more information about WMI and IIS, see Windows Management Instrumentation (WMI) in IIS 7. For more information about the classes, methods, or properties associated with this procedure, see the IIS WMI Provider Reference on the MSDN site.