Categories
Development

Multiple controller types were found that match the URL. Error withot any same routes

So I have 2 different controllers. I use Attribute routes.

This is one of the many methods at the first controller

 [HttpPost]
        [Route("bundles/paged")]
        public async Task<SomeResponse> GetPagedBundles(int pageIndex, int pageSize)

This is method from the second controller

[HttpPost]
        [Route("bundles/queued")]
        public Guid EnqueueBundle([FromBody]SomeBundle bundle)

Then I try to call second method I have an exception:

Multiple controller types were found that match the URL. This can happen if attribute routes on multiple controllers match the requested URL.

But there are no any matching urls

Leave a Reply

Your email address will not be published. Required fields are marked *