asp.net-mvc-5nopcommercenopcommerce-3.90

nopCommerce store with a custom plugin web deploy issue


NopCommerce version: 3.9

I've designed a web store using NopCommerce 3.9. Any code I added is in a plugin.

The store uses a front page that can be found in the plugin. It relies on a route called 'home' in a RouteProvider class in the plugin. It does not complain about that route, instead it complains about a route named 'RegisterVendor' found in the same file. Here are both routes

routes.MapRoute("home",
            "",
            new { controller = "AoiVendorsHome", action = "Index" },
            new[] { "Nop.Plugin.Other.AoiVendors.Controllers" });

 routes.MapRoute("RegisterVendor",
            "register/designer",
            new { controller = "AoiExchange", action = "RegisterVendor" },
            new[] { "Nop.Plugin.Other.AoiVendors.Controllers" });

The plugin installs properly and everything works exactly as expected on my local machine.

The problem is after deploying to the web it can't find the route. Here is a imgur link, follow it to see the error

Restarting the server fixes the error for a while, but it does eventually come back. It also comes back any time I redeploy without restarting the server afterwards.

Does anyone have any ideas?

Thank You.


Solution

  • I was able to fix the issue by selecting the 'Remove additional files at destination' checkbox under file publish options on the settings tab in the publish popup dialog in visual studio. I imagine an older file was not being overwritten and was causing problems.