Last post Feb 18, 2020 03:10 PM by bruce (sqlwork.com)
Feb 12, 2020 05:52 PM|mrburnttoast79|LINK
I have an application that consists of a intranet web application and intranet web api. Everything works fine locally but after publishing to my test server, the application cannot access the web api. I can access the published web api from Postman or in
the browser but the application receives a certificate validation error. The machine has a certificate installed and I have other web api's running on it and they can be accessed by external servers. Any ideas on how I can solve this?
Feb 13, 2020 09:40 AM|jiadongm|LINK
The machine has a certificate installed and I have other web api's running on it and they can be accessed by external servers.
What is this certificate, is it issued by CA? Besides, could you please show us the certificate validation error message?
Feb 13, 2020 09:52 AM|PatriceSc|LINK
This is an exception? The full details could perhaps help (ie ex.ToString() rather than ex.Message for example). You could also use https://khalidabuhakmeh.com/validating-ssl-certificates-with-dotnet-servicepointmanager to
inspect certificate errors.
Before trying to solve a problem, it's best to take few extra minutes to better understand which problem exactly you have...
Edit: you'll perhaps see code that uses this callback to just ignore certificate errors. This is IMO a bad idea. If you really have to it would best to still do a minimal check before rather than blindly accepting all certficates. For now I'm not trying
to solve your issue but rather to understand which exact issue you are running into with this certificate.
Feb 18, 2020 03:10 PM|bruce (sqlwork.com)|LINK
Check that your application is using the dns name defined for the certificate, not localhost or ipaddress.