Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

216
Vistas
SSL Certificate problems when trying to use httprepl on ASP.NET tutorial

I'm new to C# and .NET and I'm trying to follow the "Create a web API" tutorial on the Microsoft site. At the Test PostTodoItem section, I followed the instructions to install httprepl and tried to execute the following two commands:

httprepl https://localhost:5001/api/todoitems
post -h Content-Type=application/json -c "{"name":"walk dog","isComplete":true}"

I get the following error in my terminal: The SSL connection could not be established, see inner exception.. Screengrab: enter image description here

I've tried to follow various instructions to update the SSL certificates on my machine. For example, when I type dotnet dev-certs https --trust I get the following:, screenshot of response to dotnet dev-certs https --trust

The A valid HTTPS certificate is already present. response would suggest that I've fixed the issue, but I still can't get httprepl to run correctly. I've tried it on a Windows machine and it works fine (they have a much simpler way of handling SSL requests/granting permissions).

I can run the app/API in my browser, so I don't think I need to make any changes where Firefox/Chrome are concerned?

I've looked at other stack overflow solutions and they either don't work or I don't understand them. My dotnet --version is 6.0.101.

I'm pretty sure I've created SSL certificates for this already. I have a file called https.crt in my /usr/local/share/ca-certificates/aspnet folder: screenshot of https.crt

I don't know if it's relevant, but it has "DNS: localhost' there at the bottom. Can anyone explain how to troubleshoot/resolve this so I can get the tutorial working? I tried following this solution but I was unable to copy the localhost.crt into my /usr/local/share/ca-certificates/ folder. I compared the localhost.crt with my existing https.crt and it looked nearly identical, so I guessed it wouldn't fix anything.

10 months ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos