.net core 5.0 Kestrel not showing swagger endpoints

Viewed 298

I am running a small self-hosted .net core 5 REST service on a production server that the local webserver POSTS data to. The project seems to be running find, I can hit the endpoints just fine, but when I try to hit the swagger endpoints in the project, all I get is This localhost page can't be found. I am using this url http://localhost:5000/swagger to try and get to the documentation. This works on my local dev machine with both https and http (ports 5000 and 5001). I don't have an SSL cert on this machine so it is limited to port 5000.

Like I said, I can hit the endpoints just fine, I just can't get swagger to show.

1 Answers

Added the Kestrel Endpoints configuration to the appsettings.json file and pointed it to a valid cert. Then I accepted the cert and the file showed up.

Related