Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 năm cách đây
Hello,

I'm trying to write a plugin. I started by testing whether I could display something on the Index page. Here's my code:


        //My main plugin class
        public IList<string> GetWidgetZones()
        {
            return new List<string>{ "home_page_before_news" };
        }

        //My action
        [ChildActionOnly]
        public ActionResult DisplayLink(string widgetZone, object additionalData = null)
        {
            _cacheService.Clear();
            return View("~/Plugins/Widgets.PartnershipManager/Views/DisplayLink.cshtml");
        }

     //My view
     @{
        Layout = "";
      }
      
      <a href="#">My first link</a>




I'm getting the following error: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.

With no further information. Yet, I tried to match the code for NivoSlider as much as I can. Am I missing something?

Thanks for helping
7 năm cách đây
Hi,

where are you getting this error: when you are browsing public site or when you are trying to configure your plugin?
what about the GetDisplayWidgetRoute, GetConfigurationRoute methods in your plugin class?
7 năm cách đây
This is where the exception is being thrwon

public static MvcHtmlString Widget(this HtmlHelper helper, string widgetZone, object additionalData = null, string area = null)
        {
            return helper.Action("WidgetsByZone", "Widget", new { widgetZone = widgetZone, additionalData = additionalData, area = area });
        }


And this is the my GetDisplayWidgetRoute method

    public void GetDisplayWidgetRoute(string widgetZone, out string actionName, out string controllerName, out RouteValueDictionary routeValues)
        {
            actionName = "DisplayLink";
            controllerName = "PartnershipManager";
            routeValues = new RouteValueDictionary()
            {
                { "Namespaces", "Nop.Plugin.Widget.PartnershipManager.Controllers" },
                { "area", null },
                { "widgetZone", widgetZone}
            };
        }
7 năm cách đây
Here are both methods

public void GetConfigurationRoute(out string actionName, out string controllerName, out RouteValueDictionary routeValues)
        {
            actionName = "Configure";
            controllerName = "PartnershipManager";
            routeValues = new RouteValueDictionary()
            {
                { "Namespaces", "Nop.Plugin.Widget.PartnershipManager.Controllers" },
                { "area", null }
            };
        }

        public void GetDisplayWidgetRoute(string widgetZone, out string actionName, out string controllerName, out RouteValueDictionary routeValues)
        {
            actionName = "DisplayLink";
            controllerName = "PartnershipManager";
            routeValues = new RouteValueDictionary()
            {
                { "Namespaces", "Nop.Plugin.Widget.PartnershipManager.Controllers" },
                { "area", null },
                { "widgetZone", widgetZone}
            };
        }
2 năm cách đây
hello please help!
i have same problem!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.