skip to Main Content

My Postman POST request never reaches its public endpoint in the controller. The response I get back from my web application (running on a localhost port) is the app’s static index.html page.

I want to debug what happens to the request by placing a breakpoint at the application’s request "entry point", and figure out why it never reaches my controller. Where should I place the break point?

Endpoint. Please note this is a public endpoint:

[HttpPost("endpointName")]
public async Task<ActionResult> myEndpoint() {
    return Ok();
}

Postman POST request: https://localhost:44123/api/endpointName

Authorization: No Auth

Other requests (both public and private endpoints) seem to work fine.

Please let me know where I can place a breakpoint to debug this request.

2

Answers


  1. Chosen as BEST ANSWER

    FIXED:

    Stupid mistake.

    I forgot to add "myEndpoints" after /api/

    https://localhost:44123/api/myEndpoints/endpointName


  2. Check for the naming error in your API, also check whether you have specified same name in any other file as your controller.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search