November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Would this post be any helpful Quicksilver - ServiceApi: fixing issues - Quan Mai's blog (vimvq1987.com) ?
Hello,
We have been dealing with this issue for awhile, and I went back to support ticket from a year ago and was able to progress a bit further than the forum post linked. We are on CMS 11 and Commerce 13, and I have installed the correct ServiceApi and ServiceApi.Commerce packages in the correct places, and have my Startup.cs class. The engineer from Optimizely in the ticket said the following:
"After some deliberation within teams, we managed to run the site. We saw that there was no XmlFormatterType returned in the MediaTypeFormatterCollection.
Please see the attached screenshot and the attached code snippet, customInit.cs."
They provided this file, and
This gets me past the error I was getting about the ServiceApi not being initialized, but I get the following error
There is a file, WebApiConfig.cs that does some HttpMapping and related stuff. It seems this is where the conflict is coming from. This is the existing code that is causing the above error:
I tried modifying a few lines in each file and got the site to start without throwing an exception in the IDE, but it displays this message in the webpage. I do call the EnsureInitialized() several times like it says.
Here is the modified code in both files that produced the above error
I've worked on this for weeks and we've had numerous support tickets over the last year or so trying to figure this out. We had Optimizely Expert Services was gracious enough to spend 5 hours free-of-charge to look into this, but they were unsuccessful. If anyone is internal at Opti, Ticket #1029270 was the most helpful one and has the base I'm building on.
Lastly, if I do add back in the config.MapHttpAttributeRoutes(); into the WebApiConfig.cs I get the following error: I can also confirm there is nowhere else in the codebase that calls that method or does any similar route mapping. I even commented out the RouteRegister in the Global.asax.cs.