AmbiguousActionException: Multiple actions matched

Hello,

trying start Radzen App with MS SQL Database backend and AD authentication. Generated a page to display sample data and auto-generated login page. The error comes from the ASP.NET backend…

Microsoft.AspNetCore.Mvc.Internal.AmbiguousActionException: Multiple actions matched. The following actions matched route data and had all constraints satisfied:

Cosmos.Controllers.Cosmos.OrderDetailsController.GetOrderDetail (server)
Cosmos.Controllers.Cosmos.OrdersController.GetOrder (server)
Cosmos.Controllers.Cosmos.ProductsController.GetProduct (server)
at Microsoft.AspNetCore.Mvc.Internal.ActionSelector.SelectBestCandidate(RouteContext context, IReadOnlyList1 candidates) at Microsoft.AspNetCore.OData.Routing.ODataActionSelector.SelectBestCandidate(RouteContext context, IReadOnlyList1 candidates)
at Microsoft.AspNetCore.Mvc.Internal.MvcAttributeRouteHandler.RouteAsync(RouteContext context)
at Microsoft.AspNetCore.Routing.Tree.TreeRouter.d__13.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Routing.RouteCollection.d__9.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.d__7.MoveNext()

Hi. This error currently happens if one requests the server-side application without any OData route e.g. http://localhost:5000. There is no default route specified hence the error.

Is this what you are seeing?

We implemented a fix for this in our upcoming release. Browsing http://localhost:5000 will display a friendlier message.

Thank you. I realized what was happening.

Another question: I activated ActiveDirectory authentication, but the automatic generated login page seems to have an error. The div-tag has an unknown attribute “AllowRegister” i think. Deleting the attribute manually from the page solves the problem but with any compile process the change is reverted an the page doesn’t work any more.

I will investigate and report my findings.

Reproduced. The fix will ship with today’s release. Will update this thread when the build is live.

Both issues should be addressed by the 1.18.1 version which we shipped today.