I\'m getting an intermittent exception saying that asp.net mvc can’t find the action method. Here’s the exception:
A public action method \'Fill\' cou
I'v got the same problem in asp.net mvc. this error - 404 not found. I resolve problem this way - put this code in MyAppControllerBase (MVC)
protected override void HandleUnknownAction(string actionName)
{
this.InvokeHttp404(HttpContext);
}
public ActionResult InvokeHttp404(HttpContextBase httpContext)
{
IController errorController = ObjectFactory.GetInstance();
var errorRoute = new RouteData();
errorRoute.Values.Add("controller", "Pages");
errorRoute.Values.Add("action", "Http404");
errorRoute.Values.Add("url", httpContext.Request.Url.OriginalString);
errorController.Execute(new RequestContext(
httpContext, errorRoute));
return new EmptyResult();
}