Any solution for the Exception: The controller for path '/null' was not found or does not implement IController. RRS feed

  • Question

  • User-467411554 posted

    I'v been monitoring my mvc 5 web application that is deployed on azure using application insights and once in a while I get this Exception: 

       at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance (System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.DefaultControllerFactory.CreateController (System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.MvcHandler.ProcessRequestInit (System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.MvcHandler.BeginProcessRequest (System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute (System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
       at System.Web.HttpApplication.ExecuteStepImpl (System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
       at System.Web.HttpApplication.ExecuteStep (System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)

    When I check the telemetry before this request, I see

    1. GET Home/Index

    2. GET null/Index

    3. The controller for path '/null' was not found or does not implement IController.

    I checked my Index.cshtml for any possible erroneous code and could only narrow down to this piece of line:

    @Html.Action("TestMethod", "Home", Model)

    So, is there a way to avoid this exception?

    Saturday, February 16, 2019 4:14 PM

All replies

  • User-2054057000 posted

    What is the HTML generate for this code on the view:

    @Html.Action("TestMethod", "Home", Model)

    Sunday, February 17, 2019 11:58 AM