Quantcast
Viewing all articles
Browse latest Browse all 9076

Installation of EPiServer.ServiceApi destroys my site

Hi, all!

I'm installing EPiServer.ServiceApi via Nuget, as it is described in the guide, but right after that I get the following error instead of my start page:

<Error><Message>An error has occurred.</Message><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.</ExceptionMessage><ExceptionType>System.InvalidOperationException</ExceptionType><StackTrace>
at System.Web.Http.Routing.RouteCollectionRoute.get_SubRoutes() at System.Web.Http.Routing.RouteCollectionRoute.GetRouteData(String virtualPathRoot, HttpRequestMessage request) at System.Web.Http.WebHost.Routing.HttpWebRoute.GetRouteData(HttpContextBase httpContext)</StackTrace></Error>

I've tried this solution, but config.EnableCors() doesn't exist, config.MapHttpAttributeRoutes() causes error "ArgumentException: A route named 'MS_attributerouteWebApi' is already in the route collection", and all the rest doesn't help. I tried adding "GlobalConfiguration.Configuration.EnsureInitialized();" at the end of initialization, it doesn't help either.

What can be the problem? What causes this error?


Viewing all articles
Browse latest Browse all 9076

Trending Articles