London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Info: The service api has a similar appsettingskey for disabling the same thing: https://world.optimizely.com/documentation/developer-guides/archive/service-api/installation-and-configuration/3-4/
Aftert installing EPiServer.CloudPlatform.Cms and the dependent package EPiServer.Cms.HealtCheck all my ApiControllers (web api) stopped working and I got his error. An important pice of information is that the web api's that got the error (se below) were set up this attribute routing!
ERROR: "The object has not yet been initialized. Ensure that HttpConfiguration.EnsureInitialized() is called in the application's startup code after all other initialization code."
I have a webapiconfig.cs with a register method, where I call this:
And in Global.asax.cs I have this:
and also this in the end of Application_Start() in global.asax.cs:
My controller looks like this:
So attribute routing is set up using GlobalConfiguration.Configure.MapHttpAttributeRoutes(), and after some reflection of the EPiServer.Cms.HealthCheck packages I figured out that this module also were calling GlobalConfiguration.Configure.MapHttpAttributeRoutes(), but that it was possible to disalbe.
SOLUTION: A appSetting key kan be used to disable the extra call to MapHttpAttributeRoutes for the HealthCheck module
This is setting is not documented any place by Optimizely, that I can find...