You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namespaceAspBox{usingSystem.Collections.Generic;usingMicrosoft.AspNetCore.Mvc;[Route("api/values")][Route("api/values/{id}")][ApiController]publicclassValuesController:ControllerBase{// GET api/values[HttpGet]publicActionResult<IEnumerable<string>>Get(){returnnewstring[]{"value1","value2"};}[HttpGet]publicActionResult<string>Get(intid){return$"'{id}'";}}}
AmbiguousActionException: Multiple actions matched. The following actions matched route data and had all constraints satisfied:
AspBox.ValuesController.Get (AspBox)
AspBox.ValuesController.Get (AspBox)
Microsoft.AspNetCore.Mvc.Internal.ActionSelector.SelectBestCandidate(RouteContext context, IReadOnlyList<ActionDescriptor> candidates)
Microsoft.AspNetCore.Mvc.Internal.MvcAttributeRouteHandler.RouteAsync(RouteContext context)
Microsoft.AspNetCore.Routing.Tree.TreeRouter.RouteAsync(RouteContext context)
Microsoft.AspNetCore.Routing.RouteCollection.RouteAsync(RouteContext context)
Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: