dimanche 23 août 2015

Another MVC3 A public action method 'yyyyy' was not found on controller 'xxxxx.Controllers.AccountController'

I know it has been asked many many times, but we have just upgraded our server from 2003 to 2012, and suddenly our email is flooded with thousands of email with this error even users does not appear to see these errors (We are using ELMAH to handle error emailing)

The patterns seem to be:

  1. it is looking for "A public action method 'Login' was not found on controller 'appName.Controllers.AccountController" but there is no where in the code is calling 'login' (got heaps of these)
  2. We also start getting "'/apple-touch-icon-xxxx.png' was not found" error but again we don't code for Apple.

This is our RegisterRoutes code:

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );


            //Custom route for Error hander (ELMAH)
            routes.MapRoute(
            "ErrorHandler", // Route name
            "{*path}",      // URL
            new { controller = "Error", action = "Index" }
            );

These ALL a bit strange to me, can anyone suggest what should I start looking at?

Thanks in advance. WM

Aucun commentaire:

Enregistrer un commentaire