0

I have a mixed ASP.Net and MVC3 project. Site delivers both aspx and MVC views. Essentially working EXCEPT all .axd requests are being intercepted by MVC and causing exceptions:

The controller for path '/Members/Chart.axd' was not found or does not implement IController.

My routes look like this:

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");  
routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");  
animuson
  • 53,861
  • 28
  • 137
  • 147
billy jean
  • 1,399
  • 4
  • 25
  • 45

1 Answers1

0

Try this:

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

.axd files are originally designed for asp.net controls; maybe they didn't anticipate third-party followers to add subfolders to these urls.

I probably didn't explain that right, but my point is that "{resource}.axd" assumes that the url is pointing to .axd file sitting in the site-root, and not in some subfolder.

  • hi Hari thanks for the reply.. when i publish on production i am getting the following error: "A path segment that contains more than one section, such as a literal section or a parameter, cannot contain a catch-all parameter. Parameter name: routeUrl" --- any ideas? – billy jean Feb 03 '12 at 22:38