I have my brand new .NET Core service with API and I want to get list of items inside it. It's hosted on localhost and I always have this error:
16 ms
Warning: Unable to verify the first certificate
Network
Request Headers
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Postman-Token: e64e10c3-8e3a-4b47-9427-d994e2bdc9fd
Host: localhost:44397
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Request Body
Response Headers
Transfer-Encoding: chunked
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Tue, 19 Ja
n 2021 14:06:14 GMT
Response Body
How to fix it? I disabled/enabled SSL certification but it no helps.
To fix 'Error: unable to verify the first certificate' in Node. js, we should set the appropriate root certificate. require('https'). globalAgent.options.ca = require('ssl-root-cas/latest').
If you are using a self-signed certificate, make sure to add correct client certificate files (CRT, KEY, or PFX) from Settings > Certificates > Client Certificates > Add Certificate. Note: You can check for certificate data being used from the Network response pop-up or the console as explained here.
Once you add a new client certificate, open up the Postman console and send a request to the configured domain. Make sure you're using https so the client certificate is sent along with the request. In the console, inspect the certificate that was sent along with the request.
There are 3 places to disable ssl verification:
First, your OS (Windows, Mac, Linux) must trust this certificate.
Then, in Postman, go to Settings > Certificates, and enable CA certification, then select the same trusted certificate.
May be you forgotten to add this lines into Program.cs,
app.UseAuthentication();
app.UseAuthorization();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With