November Happy Hour will be moved to Thursday December 5th.

Forms Service API issues

Vote:
 

I'm having all sorts of problems getting the Forms Service API to install or be seen by the website.

I've been following the only documentation I can find on the Forms Service API https://world.episerver.com/documentation/developer-guides/forms/using-forms-serviceapi/ 
We have a solution with multiple projects in. The Core project has all the controllers, models etc in. The Web project has the views, scripts etc.

I've downloaded and installed EPiServer.Forms.ServiceApi 3.2.0 NuGet package against the core project. This also installed EPiServer.Service API 3.0.0, Microsoft.OData.Edm, Microsoft.Spatial, Microsoft.OData.Core, Microsoft.AspNet.OData, Microsoft.AspNet.WebApi.Owin.

After install and rebuild etc I get a 500 error. Log file mentions:
System.ArgumentException: A route named 'MS_attributerouteWebApi' is already in the route collection. Route names must be unique.
So I found out I had to comment out the config.MapHttpAttributeRoutes() in WepApiInitialization and add the attribute
[ModuleDependency(typeof(EPiServer.Forms.ServiceApi.InitializationModule))]

Now the website works but I get a page not found following step 5 Verify that EPiServer.Forms.ServiceApi is working.

Our website already runs under https as instructed in step 4.

I do see the EPiServerServiceApi in the Admin, Config, Permissions for Functions area as mentioned in step 6.

Any idea on how to get any further?

#186196
Dec 13, 2017 16:10
Vote:
 

I remember something along the lines...

https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2015/11/a-route-named-39ms_attributeroutewebapi39-is-already-in-the-route-collection.-route-names-must-be-unique.-parameter-name-name-/

https://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=139926

what else modules you can installed? if step 5. fails - this most probably means that attribute based registration of the routes has not been successfully done..

#186212
Dec 14, 2017 0:40
Vote:
 

I got past the MS_attributerouteWebApi error but still step 5 doesn't work.  I'm still at a loss.

#186226
Dec 14, 2017 9:36
Vote:
 

I may not need this as I've found this link which shows a different way to get the forms data out.

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2017/5/programetically-getting-episerver--forms--submitted-data/

#186237
Dec 14, 2017 12:04
* 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.