I'm working on multi tenant ASP.NET web application for digital signing. For every tenant certificate store named "Tenant_{TenantId}" is created in store location "Local Computer" (StoreLocation.LocalMachine).
Everything works fine from windows application running under account with local administrator permissions. When the same library is used from ASP.NET application hosted on IIS, only "Local System" identity can work with certificates.
I tried with local administrator user account and get exception Access is denied:
System.Security.Cryptography.CryptographicException: Access is denied.
Are there any restrictions on code under IIS? How to grant user/code read certificates permissions (from specific certificate locations/stores)?
Application is hosted on Windows Server 2012R2 / IIS 8.5 / ASP.NET 4.5