问题
I am following an online tutorial to create an ASP.Net Core Web application. I followed everything but had trouble with trusting the local Https certificate.
when I first run the application, I got an error saying: "the access control list (acl) structure is invalid"
I tried googling this error but couldn't find anything related to my ASP.NET application, after cleaning the solution I didn't get this error any longer.
But I was unable to run my application in browser using Https
as it always says:
"This site is not secure"
I tried to trust certificate using CMD using this command:
dotnet dev-certs https --trust
It should show me a prompt to trust the certificate but it says "there was an error trusting the HTTPs developer certificate" and the application runs in an unsafe mode on the browser.
can someone please help me run my application with Https on my local environment? Any help will be greatly appreciated. Thanks
回答1:
This seems to be a bug in ASP.NET Core 2.1:
what you need to do is go move your added certificates from your certificate manager.
go to start menu > Type "Ctrl + R" type "certlm.msc", this will open your certificate manager.
go to Personal/Certificates
you will find a certificate named "localhost there.
Move that to "Trusted Root Certification Authorities/Certificates"
run the project again, and it should work.
Hope this helps.
来源:https://stackoverflow.com/questions/56409580/trouble-trusting-local-https-certificate-in-asp-net-core