Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Does anybody know how to configure IIS Express to require client certificate for access? I'm trying to debug a problematic ASP.NET application which uses client certificates for authentication.

share|improve this question

migrated from stackoverflow.com Sep 9 '11 at 9:20

This question came from our site for professional and enthusiast programmers.

1  
Close? Most of the IIS Express settings are configured in Visual Studio and debugging a program is definitely related to programming... –  Marko Sep 9 '11 at 7:42
    
Then a question like "how to install Visual Studio?" would be a regular one? :) –  onof Sep 9 '11 at 8:32
1  
I don't want to argue here, but FYI IIS Express is mostly used for debugging of ASP.NET applications as it offers functionality which ASP.NET development server doesn't support. My question is related to debugging. But to debug I need to configure it first. I think it is more probable that this is already done by some developer and not by a system administrator as they would use the real IIS anyway. –  Marko Sep 9 '11 at 9:18
    
I wouldn't know how to programmatically require the client certificate for access. However, here is a resource I found help from. Hope this helps –  i.h4d35 Nov 26 '12 at 19:17

1 Answer 1

Use the IIS Manager tool and follow the Microsoft documentation IIS Client Certificate Mapping Authentication <iisClientCertificateMappingAuthentication>.

Sample config:

<location path="Default Web Site">
   <system.webServer>
      <security>
         <authentication>
            <windowsAuthentication enabled="false" />
            <anonymousAuthentication enabled="false" />
            <digestAuthentication enabled="false" />
            <basicAuthentication enabled="false" />
            <iisClientCertificateMappingAuthentication enabled="true"
                  manyToOneCertificateMappingsEnabled="true">
               <manyToOneMappings>
                  <add name="Contoso Employees"
                        enabled="true"
                        permissionMode="Allow"
                        userName="Username"
                        password="[enc:AesProvider:57686f6120447564652c2049495320526f636b73:enc]">
                     <rules>
                        <add certificateField="Subject"
                           certificateSubField="O"
                           matchCriteria="Contoso"
                           compareCaseSensitive="true" />
                     </rules>
                  </add>
               </manyToOneMappings>
            </iisClientCertificateMappingAuthentication>
         </authentication>
         <access sslFlags="Ssl, SslNegotiateCert" />
      </security>
   </system.webServer>
</location>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.