Skip to content

Instantly share code, notes, and snippets.

@mahizsas
Forked from wullemsb/wcfmvcrouting.cs
Created June 6, 2013 11:19
Show Gist options
  • Save mahizsas/5720837 to your computer and use it in GitHub Desktop.
Save mahizsas/5720837 to your computer and use it in GitHub Desktop.
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
//Extra ignores to support WCF in ASP.NET MVC
routes.IgnoreRoute("{resource}.svc/{*pathInfo}");
routes.IgnoreRoute("{resource}.svc");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment