VS 2022 not finding dev SSL cert
VS 2022, ASP.NET Core web application keeps throwing the error that there is no valid development certificate. When in fact there is one.
I've been through multiple rounds of deleting any certs manually, running clean and trust commands, but as soon as it gets back to the UseHttps() line in code it always throws the error that it can't find the dev cert.
Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
The proper localhost certificate is in both the Personal and Root folders under current user, and the date range is valid.
VS just isn't finding it for some reason. Any ideas?
I'd add that I've tried to directly retrieve the cert in code and set it as the parameter to the UseHttps() command, but for some reason when it returns the contents of the X509 store, the localhost cert is not in the results.
I'm not sure if this is a "special" behavior or not. I have just the readonly and existingonly filters on the call to open the store. But there is most certainly a valid cert in that store when I look at it in the mmc certificate console.