【问题标题】:How do I troubleshoot Web API projects?如何对 Web API 项目进行故障排除?
【发布时间】:2020-05-07 13:37:24
【问题描述】:

我已经尝试过这个 github 存储库 - https://github.com/johnph/simple-transaction,有时它可以工作(我可以登录),有时它不能(即使使用正确的用户名和密码我也无法登录)。当我无法登录时,它只会抛出No connection could be made because the target machine actively refused itObject reference not set to an instance of an object。此一般消息对我进行故障排除没有帮助。

该项目使用 Application Insights 进行日志记录,但我不想用信用卡注册 Azure 帐户。我试图在 web api 项目中放置断点(Identity.WebApi.Controllers,Authenticate 方法),但它也没有到达断点。

【问题讨论】:

    标签: c# api asp.net-core logging api-gateway


    【解决方案1】:

    通常我们使用Fidlerpostman 来测试web api,这些工具使您可以全面测试您的restfull 服务并vue 执行的http 状态

    以下是 fidler 中的无效身份验证错误示例:

    当您双击请求时,您可以看到更多详细信息

    【讨论】:

      猜你喜欢
      • 2013-11-20
      • 2011-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-07
      • 1970-01-01
      相关资源
      最近更新 更多