Error 404 for .axd files (WebResource.axd & ScriptResource.axd)

If you’ve got a similar error as on following image:

ScriptResource.axd error 404

that your script resources related with components like UpdatePanel or ScriptManager are not working correctly, think about routing. It may by caused by many other reasons as wrote on similar blog post across the web e.g. wrong version of related System.Web.Extensions.dll or wrong IIS configuration or incorrect handlers defined in web.config. BUT when you are working in hybrid ASP.NET application where are .aspx + .chtml pages together (old Web Forms and new MVC) the problem will probably be routing.

Check and correct your RouteConfig.cs as on following image:

Ignore .axd Resources in RouteConfig.cs

public static void RegisterRoutes(RouteCollection routes)
	// Default MVC routing
       name: "D1",
       url: "{controller}/{action}/{id}",
       defaults: new { controller = "Default", action = "Index", id = UrlParameter.Optional }



Comments are closed