0

I have a .Net Core application whose cert expired which is currently being hosted directly on IIS. We changed the cert on the server, before I was accessing the cert on C drive but we've since installed it on the local machine in the cert store.

Image of certificated stored on local computer

I'm trying to access the Wildcard certificate in the store through the appsettings.json. However I'm still running into a HTTP Error 500.30 - ANCM In-Process Start Failure.

From the windows logs I'm seeing:

'Invalid certificate store location 'Personal'

Currently I have this:

   "IdentityServer": {
    "Clients": {
      "Dashboard": {
        "Profile": "IdentityServerSPA"
      },
    },
    "Key": {
        "Type": "Store",
        "StoreName": "LocalComputer",
        "StoreLocation": "Personal",
        "Name": "CN=Wildcard"
    }

Am I accessing the certificate the right way? Or is there something else I need to do?

Kevin Z
  • 65
  • 8
  • Are you hosting this app in IIS? Or directly exposing Kestrel? – mason Aug 03 '22 at 16:38
  • @mason I'm hosting directly on IIS. – Kevin Z Aug 03 '22 at 16:39
  • Is the error in the Windows Event Log? Normally these sorts of errors show up there as Warnings. – mason Aug 03 '22 at 16:40
  • @mason "Invalid certificate store location 'Personal'" from the windows logs. – Kevin Z Aug 03 '22 at 17:28
  • Please edit that info into your question, including the full exception message and stack trace. – mason Aug 03 '22 at 17:33
  • [Other questions](https://stackoverflow.com/questions/57246219/how-to-configure-key-settings-for-identityserver-in-appsettings-json-for-aspnet) show a store name of "My" and a store location of "CurrentUser". Did you look into that? – mason Aug 03 '22 at 17:36
  • Have you tried setting it like this: `"StoreLocation" : "LocalMachine" , "StoreName" : "My"`? – Chen Aug 04 '22 at 06:42
  • @Chen yes, when I did that it worked however it won't pick up my cert. It finds the localhost one just fine which is what we're using for now. – Kevin Z Aug 05 '22 at 16:13

0 Answers0