Created
June 1, 2013 10:13
-
-
Save wullemsb/5689903 to your computer and use it in GitHub Desktop.
To integrate WCF service in your ASP.NET MVC project, add the following routing info to your routeconfig file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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