Here's what I've tried so far:

  • Made the default "ASP.NET Core API" project (the weather forecasting one) in Visual Studio
  • Built it and copied the contents of the build folder to C:\Users\[My username]\TestService
  • Ran the TestService executable. It says "Now listening on: http://localhost:5000"
  • Open my browser, enter the "http://localhost:5000" URL. I get a 404 error. This is all on the same computer.
  • Noticed that, under launchSettings.json, there were some other URLs listed, none of them localhost:5000. It gives 2 https URLs: https://localhost:7079 and http://localhost:5222. Both of these give "connection refused" errors.
  • At this point, I don't know what else to do

Please help I don't want to lose my job

EDIT: I was able to figure out what was going on. Solution is here. Thanks to hypercracker and everyone else who advised heart-sickle

  • GaveUp [she/her]
    ·
    edit-2
    2 months ago

    Can you link that default server code?

    404 means your browser was able to successfully ping your server and get a response, but there wasn't an endpoint implemented for the one you hit

    Maybe it's missing a GET for the default empty endpoint