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.
FIXED:
Stupid mistake.
I forgot to add "myEndpoints" after /api/
https://localhost:44123/api/ myEndpoints /endpointName
Check for the naming error in your API, also check whether you have specified same name in any other file as your controller.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.