MapServiceRoute don't work

Topics: Web Api
May 9, 2011 at 3:38 PM

I don't know that Why RouteCollection Class in System.Web namespace don't contain MapServiceRoute method. (I am using VS2010 Ultimate, .Net framework 4).

May 9, 2011 at 3:53 PM

MapServiceRoute is in namespace Microsoft.ApplicationServer.Http.Activation in the following assembly Microsoft.ApplicationServer.HttpEnhancements. You have to make a reference to that assembly to make the following call

 RouteTable.Routes.MapServiceRoute<ContactResource>("Contact", config);

 


 


May 9, 2011 at 4:12 PM

Ok! Thanks!