Hi,

I developed a plugin with three custom routes. It works great until I install nop4you.com's OData API plugin. The main issue is the new route for "checkout/confirm" to a custom Checkout Controller. When the code for the custom checkout controller gets to return RedirectToRoute("Nop.Plugin.Burkhart.Checkout.Confirm") the web page breaks and shows a 500 error.

I purchased the source code for nop4you.com's OData API, hoping it may help debug the issue, but no luck yet. Any tips on how to resolve this issue would be greatly appreciated.

NOTE: nop4you.com hasn't been able to determine the cause either.

Here's my routing code.

using Microsoft.AspNetCore.Routing;
using Nop.Web.Framework.Localization;
using Nop.Web.Framework.Mvc.Routing;

namespace Nop.Plugin.Burkhart.Checkout.Infrastructure
{
    public partial class RouteProvider : IRouteProvider
    {
        public int Priority => 60;

        public void RegisterRoutes(IRouteBuilder routeBuilder)
        {
            //reroute Checkout to BurkhartCheckoutController
            routeBuilder.MapLocalizedRoute(
                "Nop.Plugin.Burkhart.Checkout",
                "checkout",
                new { controller = "BurkhartCheckoutController", action = "Index" }
            );

            //reroute Checkout to BurkhartCheckoutController
            routeBuilder.MapLocalizedRoute(
                "Nop.Plugin.Burkhart.Checkout.Confirm",
                "checkout/confirm",
                new { controller = "BurkhartCheckoutController", action = "Confirm" }
            );

            routeBuilder.MapLocalizedRoute(
                "MyList",
                "mylist/{customerGuid?}",
                new { controller = "ShoppingCart", action = "Wishlist" });

        }
    }
}



Here's the error I get from the Output window

Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker:Information: Executed action method Nop.Plugin.Burkhart.Checkout.Controllers.BurkhartCheckoutController.Index (Nop.Plugin.Burkhart.Checkout), returned result Microsoft.AspNetCore.Mvc.RedirectToRouteResult in 40033.4533ms.
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker:Information: Executed action Nop.Plugin.Burkhart.Checkout.Controllers.BurkhartCheckoutController.Index (Nop.Plugin.Burkhart.Checkout) in 40127.2317ms
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.7\System.Diagnostics.StackTrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Microsoft.AspNetCore.Server.Kestrel:Error: Connection id "0HLK2BJM7OOG9", Request id "0HLK2BJM7OOG9:00000008": An unhandled exception was thrown by the application.

System.InvalidOperationException: No route matches the supplied values.
   at Microsoft.AspNetCore.Mvc.Infrastructure.RedirectToRouteResultExecutor.ExecuteAsync(ActionContext context, RedirectToRouteResult result)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultAsync(IActionResult result)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResultFilterAsync[TFilter,TFilterAsync]()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request finished in 40217.9358ms 500