对于 POST 请求,NET Core Web 应用程序的入口点在哪里(以便我可以在那里放置断点)?

For a POST request, where is the entry point in NET Core Web application (so that I can place a breakpoint there)?

我的 Postman POST 请求从未到达其在控制器中的 public 端点。我从 Web 应用程序(本地主机端口上的 运行)返回的响应是应用程序的静态 index.html 页面。

我想通过在应用程序的请求“入口点”放置一个断点来调试请求发生了什么,并弄清楚为什么它永远不会到达我的控制器。我应该在哪里设置断点?

端点。请注意这是一个 public 端点:

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

邮递员[=3​​0=]请求:https://localhost:44123/api/endpointName

授权:无授权

其他请求(public 和私有端点)似乎工作正常。

请告诉我在哪里可以放置断点来调试此请求。

检查您的 API 中的命名错误,同时检查您是否在任何其他文件中指定了与您的控制器相同的名称。

已修复:

愚蠢的错误。

我忘记在 /api/

之后添加“myEndpoints”

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