You have build this nicely secured application in ASP.NET but now you want to deploy it to IIS. Suddenly the application no longer works because you are calling some secure backend services using a certificate in your certificate store. However your IIS application pool user cannot access the certificate.
How can we give IIS 7.5 the correct permissions to read a certificate from the certificate store?
- Open the certificates MMC.
- Open MMC
- Click File –> Add/Remove Snap-in…
- Choose Certificates and click Add
- Select Computer Account and click Finish
- Check if the certificate is available in the "Local Computer\Personal" cert store.
- Check if the private key of the certificate is marked as exportable.
- Right click on the certificate and choose "All Tasks --> Manage Private Keys" and "IIS AppPool\DefaultAppPool" or other user or app pool account that the IIS 7.5 app pool is using (ApplicationPoolIdentity).
That’s it!