RouteProvider: Controller within Plugin not found

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 anos atrás
I am developing a plugin and registered some new routes as well as overriding existing routes. On my workstation locally everything works fine. After deploying the whole solution to our testserver I get following problems:

First: My RouteProvider:


// Overwrite standard nopCommerce Routing for index page.
            routes.MapRoute("MyRoute",
                            "",
                            new { controller = "SimpleWebshop", action = "Index" },
                            new[] { "MyNamespace.Plugin.Products.Controllers" });

            routes.MapRoute("MyRouteCart",
                "ShoppingCart",
                new { controller = "ShoppingCart", action = "Index" },
                new[] { "DMyNamespace.Plugin.Products.Controllers" });

            routes.MapRoute("MyRouteCustomerMail",
                "Customer",
                new {controller = "Customer", action = "ChangeEMail"},
                new[] {"MyNamespace.Plugin.Products.Controllers"});

            routes.MapRoute("MyRouteCustomerPassword",
                "ChangePassword",
                new {controller = "Customer", action = "ChangePassword"},
                new[] {"MyNamespace.Plugin.Products.Controllers"});

            routes.MapRoute("MyRouteMyOrders",
                "MyOrders",
                new {controller = "Order", action = "MyOrders"},
                new[] {"MyNamespace.Plugin.Products.Controllers"});

...

   public int Priority
        {
            get { return 0; }
        }




On a new route: e.g. http://srvxyz/MyOrders i get the following message:

Multiple types were found that match the controller named 'Order'. This can happen if the route that services this request ('MyOrders') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter.

The request for 'Order' has found the following matching controllers:
Nop.Admin.Controllers.OrderController
Nop.Web.Controllers.OrderController
----

I am missing that the request for 'Order' find my custom controller: MyNamespace.Plugin.Products.OrderController


I deployed the plugin in the way that I just copied everything in the Web/Plugins/<MyPlugin> folder from my workstation to the same folder on the testserver. The installation worked as well smoothly.

Does anyone can help me on this?
7 anos atrás
Alright, after I tried the same deployment on another server which worked fine, i just deleted the complete test-directory on the test server and deployed it all again and TADA: it works as it should.

Seems like I missed anything on the deployment or what so ever.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.