Build and test the web API

CMF 1 Reputation point
2022-07-18T14:00:21.507+00:00

221863-2022-07-18.png221864-2022-07-18-1.png221849-2022-07-18-2.png221780-2022-07-18-3.png221891-2022-07-18-4.png221837-2022-07-18-5.png221829-2022-07-18-8.png

Hi,

I am attempting to build and test the web API in a MS learning exercise on my laptop, not in the sandbox and I am unable to establish a connection to the port. What are my options?

Developer technologies ASP.NET ASP.NET Core
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2022-07-18T15:09:46.64+00:00

    You need to type the url in the browser.

    You can also create a visual studio code launch file to do this when you do a debug

    also you can use a command line

    MacOs: open https://localhost:5001

    windows: start https://localhostt:5001


  2. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2022-07-18T19:51:01.4+00:00

    you don't include {} with port. its just :

    httprepl https://localhost:7053 --verbose

    if you implemented swagger the swagger file should have been found:


  3. Anonymous
    2022-07-19T06:21:50.03+00:00

    Hi @CMF ,

    The tutorial Exercise - Create a web API project is clear, I followed the steps to create a new API application, everything works well.

    You can check the following screenshot:

    222057-image.png

    Then, open a new integrated terminal from Visual Studio Code, the new terminal screenshot as below:

    222171-image.png

    You can refer the tutorial and try again.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Dillion


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.