Error: Action has more than one parameter bound from request body

前端 未结 6 1107
死守一世寂寞
死守一世寂寞 2021-01-11 14:15

I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think InvalidOperationException coming from with Swagger. I marked

6条回答
  •  臣服心动
    2021-01-11 14:27

    My controller has some refactored code whose methods are marked public. Looks like either moving them out of the controller or marking private corrects this problem. Or attributing the pesky methods with [NonAction] might also be a choice as asked at asp.net Core mvc hide and exclude Web Api Controller Method

提交回复
热议问题