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

前端 未结 6 1094
死守一世寂寞
死守一世寂寞 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:35

    I received error "has more than one parameter that was specified ..." for having mention of [ApiController] on top of class and then inheriting class from APIController.

    Corrected issue by inheriting the class from Controller.

    [Authorize]
    [Route("api/the")]
    **[ApiController]**
    public class TheController : **Controller**
    

提交回复
热议问题