Closed
Description
In an app created from the Blazor server template, CertificateManager.ListCertificates is consuming ~5% of startup time. Within ListCertificates, a significant portion of normal processing time is spent opening the certificate stores and enumerating/validating every certificate. However, in the typical developer use case, an ASP.NET certificate will be found in the user store (since that's where it's generally added), but we still open and enumerate the local machine store, anyway. It could be beneficial to first check the user store and only look at the local machine store if a valid cert can't be found in the user store.
cc: @halter73