Inside the global.asax of my MVC website I am trying to add a reference for a WCF Service, according to what I found online, I should use something similar to:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.Add(new ServiceRoute("Person", new WebServiceHostFactory(), typeof(PersonService)));
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
But, even after saying that the class ServiceRoute
is using the namespace System.ServiceModel.Activation, the compiler still says that is not an existing class.....
The same happens to the class "WebServiceHostFactory
"... visual studio ask me if I want to create this class......
What am I missing in here?