Postman error: "Unable to verify the first certificate" when try to get from my .net core api

Viewed 78974

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.

7 Answers

There are 3 places to disable ssl verification:

  1. Request level: make sure it is off

enter image description here

  1. Global level: (Request level will have precedence)

enter image description here

  1. Remove client and CA certificate, turn it to off :

enter image description here

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.

I had the same issue with the Postman unable to verify the first certificate. The same localhost endpoint worked within a browser, but not in Postman while running in debug in VS. In my case re-installing IIS Express fixed the problem.

May be you forgotten to add this lines into Program.cs,

app.UseAuthentication();
app.UseAuthorization();

If you face this error while Autherization, check your Auth Token first. Could be an issue with your token itself.

Just turning SSL off worked for me.

upload the root ca of the certificate issuer in postman and it will work

When in Development (i.e. localhost) then use http route to your ASP .Net server instead of https and ignore certificates completely. You will save yourself a lot of pain and time just using http for development.

enter image description here

As you see in the picture your App has 2 routes to connect to. Use the http one. (If you don't have one then set it up).

Related