2

A fellow developer created a Web API .NET Core 2.2 solution that is being hosted on Azure. He is able to run it fine locally on his machine (the machine it was created on). We are using https for the web api calls. I am also using Visual Studio 2019 Community Edition.
The web api work when we publish to Azure.

The problem is when I try to run it locally on my machine the web apis do not work. Looking at it with Postman I get this:

Error: unable to verify first certificate.

So it is obviously a certification error. I have done a few searches and found a few pages that walked you through creating a certificate but I haven't had any success so far with them.

So I am stuck and help would be most appreciated.

Some of the sites I have gone to are:

https://medium.com/@the.green.man/set-up-https-on-local-with-net-core-and-docker-7a41f030fc76 https://www.hanselman.com/blog/DevelopingLocallyWithASPNETCoreUnderHTTPSSSLAndSelfSignedCerts.aspx ASP.NET Core + IIS Express how to setup SSL Certificate

ashlar64
  • 1,054
  • 1
  • 9
  • 24
  • 2
    I guess you do not have valid certificates for "http**s**". What steps did you try to generate these certificates? – silentPlanet Jul 24 '20 at 13:46
  • Some of the sites I have gone to are: – ashlar64 Jul 24 '20 at 17:35
  • 2
    "The web api work when we publish to Azure" is because Azure App Service gives it a valid server certificate. "locally on my machine the web apis do not work" is due to the fact that it uses self signed certificates. You have to force such certificates to be trusted, https://learn.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-3.1&tabs=visual-studio#trust-the-aspnet-core-https-development-certificate-on-windows-and-macos Also Postman might require some extra configuration (not sure, but things like Firefox does ask for more). – Lex Li Jul 24 '20 at 20:37

0 Answers0