Я получаю ошибку ниже при запуске приложения Web API с. NET Core 3.0. Я реализовал Attribute Routing и использовал приведенный ниже код в методе Configure statup.cs
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
Ошибка:
crit: Microsoft.AspNetCore.Hosting.Diagnostics[6]
Application startup exception
System.ArgumentException: There is an incomplete parameter in the route template. Check that each '{' character has a matching '}' character. (Parameter 'routeTemplate')
---> Microsoft.AspNetCore.Routing.Patterns.RoutePatternException: There is an incomplete parameter in the route template. Check that each '{' character has a matching '}' character.
at Microsoft.AspNetCore.Routing.Patterns.RoutePatternParser.Parse(String pattern)
at Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory.Parse(String pattern)
at Microsoft.AspNetCore.Routing.Template.TemplateParser.Parse(String routeTemplate)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Routing.Template.TemplateParser.Parse(String routeTemplate)
at Microsoft.AspNetCore.Mvc.ApplicationModels.InferParameterBindingInfoConvention.ParameterExistsInAnyRoute(ActionModel action, String parameterName)
at Microsoft.AspNetCore.Mvc.ApplicationModels.InferParameterBindingInfoConvention.InferBindingSourceForParameter(ParameterModel parameter)
Спасибо!