我正在尝试运行NET Core 3.0 WebAPI项目,但收到以下错误
An unhandled exception occured while processing the request in asp.net
core 3.0 web api
错误消息单击此处显示
根据您收到的错误,这:
[ApiController]
[Route("[controller]}")]//the example have extra `}` here
public class WeatherForecastController : ControllerBase
生成以下错误:
检查每个"{"字符是否具有匹配的"}"字符。
您需要检查WeatherForecastController
的属性路由及其Get
操作,以查找是否有任何额外的{
/}
或缺少括号。