Home > Software engineering >  For a POST request, where is the entry point in NET Core Web application (so that I can place a brea
For a POST request, where is the entry point in NET Core Web application (so that I can place a brea

Time:03-29

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.

CodePudding user response:

FIXED:

Stupid mistake.

I forgot to add "myEndpoints" after /api/

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

CodePudding user response:

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

  • Related