wooncherk wrote:Does anybody facing this issues? I am trying to override admin controller with plugin, but then sometime the system doesn't override it, but after few restart it will work again. Is there any way to load it after restart application at one time only?
Any sample codes of how you are wiring things up? Without sample codes we can't comment much... :)
using Nop.Core.Infrastructure;
using Nop.Core.Plugins;
using System.Web.Mvc;
namespace Misc.ExportCustomer
{
public class AdminAreaRegistration : AreaRegistration
{
public override string AreaName
{
get { return "Admin"; }
}
public override void RegisterArea(AreaRegistrationContext context)
{
var pluginFinder = EngineContext.Current.Resolve<IPluginFinder>();
if (pluginFinder != null)
{
var pluginDescriptor = pluginFinder.GetPluginDescriptorBySystemName("Misc.ExportCustomer");
if (pluginDescriptor != null)
{
context.MapRoute(
"export_customer",
"Admin/Customer/ExportExcelAll",
new { controller = "CustomCustomer", action = "ExportExcelAll", area = "Admin" },
new[] { "Misc.ExportCustomer.Controllers" });
}
}
}
}
}
this is how I register it to override the ExportExcelAll action. Actually it is working, but sometime when I restart the application to load the update to the latest library files. It doesn't override the ExportExcelAll action, to resolve it I need to restart the application again, sometime few times.
What I concern is, as myself know that the library files is loaded properly, but customer don't. So I want to make sure the action is overrided 100% at all time.