2

I'm having an issue where my asp.net web service is loading a certificate from the certstore but the private key is not available. Hovering over the property, is showing a WindowsCryptographicException.

The code is working fine under a console app. In looking at the X509Certificate2, it is only the PrivateKey that seem to not being loaded.

I found this link about a very similar problem using IIS. The accepted answer here was to ensure the the full user profile is loaded. Does anyone know how to do this in kestrel?

I've been digging thru WebHostBuilder docs but haven't seen anything yet.

Both the console and kestrel are running under VS 15.5/my user, which is admin, and setup for .net 2.0 runtimes.

Steve R.
  • 165
  • 2
  • 9
  • I was able to work around this issue by loading my cert from a file instead of the windows certificate store. I'd still be curious to know how to get this load correctly from the cert store. – Steve R. Dec 15 '17 at 13:47

0 Answers0