I'm trying to change a webapi project to use OWIN, based in part on this article:
http://www.asp.net/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api
However this appears to involve changing my RouteConfig.RegisterRoutes
method from using a System.Web.Routing.RouteCollection
to a System.Web.Http.HttpRouteCollection
. How would I do the following with the HttpRouteCollection
?
public static void RegisterRoutes(HttpRouteCollection routes)
{
routes.IgnoreRoute("elmah.axd"); // No IgnoreRoute extension for HttpRouteCollection?
Or am I approaching this all wrong?
The main driver for this is I am using signalR in the project, but because it seems to automatically use OWIN I've ended up with a mix of configuration in Global.asax (for webapi stuff) and OwinStartup class (for signalR) and I'm prefer to do it all in one place.