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
InvalidOperationException
For me in the definition of the a new controller automatically add this prerequisite. I removed it and it works
[Route("api/[controller]")] [Apicontroller] //remove this line