【问题标题】:An unhandled exception occured while processing the request in asp.net core 3.0 web api在 asp.net core 3.0 web api 中处理请求时发生未处理的异常
【发布时间】:2019-10-23 17:12:51
【问题描述】:

我正在尝试运行 NET Core 3.0 WebAPI 项目,但出现以下错误

An unhandled exception occured while processing the request in asp.net 
core 3.0 web api

error msg click here to show

【问题讨论】:

  • 问题是?
  • 您是否阅读了详细信息并检查了您的申请关于所描述的要检查的内容?

标签: asp.net-web-api visual-studio-2019 asp.net-core-3.0


【解决方案1】:

根据你得到的错误,这个:

[ApiController]
[Route("[controller]}")]//the example have extra `}` here 
public class WeatherForecastController : ControllerBase

产生以下错误:

检查每个“{”字符是否有匹配的“}”字符。

您需要检查WeatherForecastController 的属性路由及其Get 操作,以查找是否有任何额外的{/} 或缺少括号。

【讨论】:

  • '{' 在另一个控制器中缺少括号,感谢“Xing Zou”的建议
  • @Vikas Great..如果你解决了问题,你能accept the answer
猜你喜欢
  • 2019-10-22
  • 1970-01-01
  • 2022-11-12
  • 1970-01-01
  • 2016-12-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多