title: How to configure key settings for IdentityServer in appsettings.json for aspnet core app running on IIS
body: <p>I created the template Angular / ASP.NET Core with authorisation support using this command:</p>
  
  <p><code>dotnet new angular --auth Individual</code></p>
  
  <p>This is an:</p>
  
  <ul>
  <li>ASP.NET Core 3.0 App with</li>
  <li>ASP.NET Core Identity for authenticating and storing users,</li>
  <li>IdentityServer4 for implementing Open ID Connect,</li>
  <li>Angular SPA,</li>
  </ul>
  
  <p>All pre-configured to work together.</p>
  
  <p><em>Before I deploy my app based on this template, I'm trying to first deploy this template app to IIS.</em></p>
  
  <p>I've deployed the app to IIS and have a database setup and the app connected to it just fine, but I'm stuck. I am not sure how to create and configure the production certificate to use for signing tokens.</p>
  
  <p>At <a href="https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity-api-authorization?view=aspnetcore-3.0#deploy-to-production" rel="noreferrer">this point in the Microsoft docs</a> it briefly mentions "A production certificate to use for signing tokens." and gives and example for deployment to Azure.</p>
  
  <p>How do I create the key in IIS? do you do something here?
  <a href="https://i.stack.imgur.com/o9TiK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/o9TiK.png" alt="IIS Server Certificate"></a></p>
  
  <p>Then how do I then add the correct settings to appsettings.json?</p>
  
  <pre><code>"IdentityServer": {
    "Key": {
      "Type": "Store",
      "StoreName": "My",
      "StoreLocation": "CurrentUser",
      "Name": "CN=MyApplication"
    }
  }
  </code></pre>
  
  <p>I'm struggling to find any guides or examples on the net, any help or point in the right direction would be appreciated.</p>