Thursday, February 16, 2012

Grant IIS 7.5 access to a certificate in certificate store

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!

5 comments:

Anonymous said...

Thanks

Rikin Patel said...

Thank you very much....

Rizvi said...

Thanks, you saved me a day.

GMAjay said...

Hello,
I have IIS and configured application pool (not default app pool). The application pool which i added has domain user credentials. But under Manage Private key, this app pool is not listed. what i have to do or what i am missing to show the application under Manage Private Keys?

Anonymous said...

Thank you dear internet wizard!