I’m currently configuring an existing WCF SOAP webservice to be accessible using WebApi
I have added the WebApi attributes, and the following code into global.asax:
RouteTable.Routes.SetDefaultHttpConfiguration(new WebApiConfiguration() { EnableTestClient = true });
RouteTable.Routes.MapServiceRoute<Contacts>("api/contacts/");
Is it possible to configure webapi using the web.config instead of these lines?
This is not possible out of the box, however it’s not impossible to achieve using the extensability points built into WCF.