A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Hey Guys,
I have the lastest EPI + Commerce + Epi Find installed. Everything works.
And i just wanted to configure WebAPi.
But i get the following error. "ExceptionMessage: "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've tried several things but either i get this or i get a 404 on the API call. (http://localhost/api/v1/status)
My code setup now.
TestController:
My webapiconfig.cs class
My initialization class:
And ofcourse i call my api by the url : localhost/api/v1/status
This gives me
I've read some posts about changing the INitialization module to this
and remove the config.MapHttpAttributeRoutes(); from the webapiconfig.cs, but that just gives me a 404 on the webapi call..
Other posts like this https://world.episerver.com/forum/developer-forum/Developer-to-developer/Thread-Container/2017/4/the-object-has-not-yet-been-initialized--ensure-that-httpconfiguration-ensureinitialized/ Just basically gives me the same 404 or the same error as above.
How do you guys have it working.