2-Way SSL for WCF Web Service Hosted on IIS
I recently was involved in getting the above to work in our environment. The steps follows:
- Ensure that the SSL certificates are correctly signed
- Ensure that the SSL certificate chain is present and valid
- Install the certificates in the “Current User” account for validation
- Execute mmc.exe, add “Certificates” snap-in with “My user account”
- Install the certificate within “Personal” store
- Verify by using Internet Explorer to retrieve the WSDL from the remote web service
- If the certificate and chain are correct, Internet Explorer will validate them and report so with “Certificate is OK”
- Install the certificates (and the entire chain) in the “Local Computer” account
- Execute mmc.exe, add “Certificates” snap-in with “Computer account”
- Install the certificate within “Personal” store
- Note the thumbprint of the certificate
- Configure the WCF web.config to make use of “Client Certificates” by finding the certificate
- within the “LocalMachine”
- using the thumbprint (remove the spaces)
- Note the IIS application pool name configured to execute requests to the WCF web service (e.g. web service pool)
- Find the certificate in mmc for “Local Computer” account, right-click on the certificate to “Manage Private Keys”
- In the Permissions Dialog,
- add the user “IIS AppPool\PoolName” (e.g. IIS App Pool\web service pool)
- allow the user “Full Control”
Comments