DefaultInlineConstraintResolver Error in WebAPI 2

后端 未结 6 1582
春和景丽
春和景丽 2020-12-23 13:10

I\'m using Web API 2 and I\'m getting the following error when I send a POST to my API method using IIS 7.5 on my local box.

The inline constraint resolver o         


        
6条回答
  •  半阙折子戏
    2020-12-23 13:29

    I also got this error when I left a space between the variable name and the variable type in the route, like so:

    [HttpGet]
    [Route("{id: int}", Name = "GetStuff")]
    

    It should be the following:

    [HttpGet]
    [Route("{id:int}", Name = "GetStuff")]
    

提交回复
热议问题