SaaS CMS has officially launched! Learn more now.

EPiServer.Forms.ServiceApi and web api attribute routing in same project

Found in

EPiServer.Forms.ServiceApi 2.0.0.2

Fixed in

EPiServer.Forms.ServiceApi 3.0.0

(Or a related package)

Created

Apr 27, 2016

Updated

Jul 11, 2016

Area

Core

State

Closed, Fixed and tested


Description

1. Create a new epi site like Alloy.
2. Create a custom WebApi controller using attribute routing and test that it is working correctly.
3. Add Epi Forms and EPiServer.Forms.ServiceApi to the solution.
4. Add files to the solution

Result:

If enabling episerver:serviceapi:maphttpattributeroutes, you get this error: A route named 'MS_attributerouteWebApi' is already in the route collection. Parameter name: name.
http://screencast.com/t/R4caDTYk

If disabling it, you get this error: ValueFactory attempted to access the Value property of this instance.
http://screencast.com/t/t5qB4AFgH6P