Hi,
I have a problem, when trying to consume the Epicor REST API, since visual studio generates the security error, if I make the same query from Postman, it works well, how can I also respond from visual studio?
PS: This is a translation by google translator
Either you need to have a valid certificate or you need to disable cert checking
1 Like
jasond
(Jason Duncan)
October 5, 2018, 5:47pm
3
You may also be able to download the certificate and add it to the trusted sites cert storage on the pc you’re running it from.
Hi, @Chris_Conn
How can I get a valid certificate, is a test server
josecgomez
(Jose C Gomez)
October 5, 2018, 5:59pm
5
You can buy one or get one from Lets Encrypt… or you can just bypass the certificate checking
hi @josecgomez
How bypass the certificate checking?
i tried this
ServicePointManager.ServerCertificateValidationCallback += (senderC, cert, chain, sslPolicyErrors) => true;
josecgomez
(Jose C Gomez)
October 5, 2018, 6:12pm
9
If you are getting that error in the browser then your issue is not just the Certificate.
I will explain all my problem.
If I reailize a GET request from the web browser, I get an answer.
If I file a POST petition from the postman, I get an answer
then from the postman, check the code, copy it and paste it in Visual
When I execute it
josecgomez
(Jose C Gomez)
October 5, 2018, 6:24pm
11
Run it with Fiddler and compare your C# request to the postman one.
Chris_Conn
(Chris Conn)
October 5, 2018, 7:14pm
13
Is it possible your URI isnt being properly built? - in debugger, you should be able to track that down
@josecgomez does this parameter look correct?
You might try temporarily excluding the parameter
josecgomez
(Jose C Gomez)
October 5, 2018, 7:18pm
14
Yeah… not sure you need to look at the Raw Request in Fiddler and compare it to the Raw Request from POSTMAN also in fiddler and you should immediately see the issue.
they had all the reason,
The problem was this:
https: //epicor102.crisalida.local/ERP102200/api/swagger/v1/methods
I change it for:
https: // epicor102 / ERP102200 / api / v1
and it works well
thank you very much to both