Episerver find DefaultApi is already in the route collection

Vote:
 

I have just installed episerver find into my project. When I try to run the project, I am getting an error:

'A route named 'DefaultApi' is already in the route collection'.

I could only see one instance of 'Default Api' in my entire solution and it is WebApiConfig. There is no other place with 'DefaultApi'.

#150163
Jun 13, 2016 11:03
Vote:
 

Sounds like a name clash. Possible to rename route for webapi?

You can probably remove it altogether if you have Episerver Find installed as well. 

Episerver Find sets some default routing for webapi in the class EPiServer.Find.UI.WebApiConfig. 

HttpRouteCollectionExtensions.MapHttpRoute(config.Routes, "DefaultApi", basePath + "/{controller}/{id}", (object) new
      {
        id = RouteParameter.Optional
      });

These will collide with your web api routes...so rename or remove your web api route should solve the issue

Hope that helps... :)

#150169
Edited, Jun 13, 2016 11:48
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.