How to Configuring IdentityServer to Access Store Certificate in my .NET 5 Webassembly App?

Posted 305 days ago by Andreas

Hello Everyone,

I was able to deploy my website to the production host ( I bought a ssl certificate with them. If I configure my appsettings.json as seen below and manually copy my certificate (pfx) ito the wwwroot folder all works. How would I now configure my IdentityServer in appsettings.json to use not the physical file certificate (pfx) but use the certificate from the store of my Host? I attached a sample I found for Azure, but not sure how to configure it exactly?

Any help would help me greatly! Thanks, Kind blessings, Andreas

  "IdentityServer": {
   "Key": {
     "Type": "File",
     "FilePath": "wwwroot\\",
     "Password": "123456"
   "Clients": {
     "xxxx.Client": {
       "Profile": "IdentityServerSPA"


"IdentityServer": {
  "Key": {
    "Type": "Store",
    "StoreName": "My",
    "StoreLocation": "CurrentUser",
    "Name": ""
  • 0

    Something like this

    var cert = new X509Certificate2(Path.Combine(ContentPath, "custom-name.pfx"), "custom-pwd");


    services.AddIdentityServer().AddSigningCredential(cert); // Microsoft.Extensions.DependencyInjection IdentityServerBuilderExtensionsCrypto

    Posted 17 days ago by alex56903
Someone is typing...

Post a Reply

You must be logged in to add a new post.
Number of online users: 1
An error has occurred. This application may no longer respond until reloaded. Reload 🗙