I am working on upgrading a project from sitecore 8.1 to sitecore 9.3. When I published the solution to the root directory of sitecore 9.3 after updating framework and dlls of the project, I get below error -

enter image description here

Can anyone please suggest how to resolve this issue?

{"Message":"An error has occurred.","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.","ExceptionType":"System.InvalidOperationException","StackTrace":"   at System.Web.Http.Routing.RouteCollectionRoute.get_SubRoutes()\r\n   at System.Web.Http.Routing.RouteCollectionRoute.GetRouteData(String virtualPathRoot, HttpRequestMessage request)\r\n   at System.Web.Http.WebHost.Routing.HttpWebRoute.GetRouteData(HttpContextBase httpContext)"}
  • Do you have all the routes configured properly? I know that a missing closing } bracket can cause issues like yours, e.g. [Route("api/sitecore/something/{argumentId"] without } after argumentId ` Aug 26 '21 at 10:50
  • @MarekMusielak I have not changed any code. If it was working on sitecore 8.1 then it should work on sitecore 9.3 as well, I guess. Unless if something has gone obsolete.
    – NewbieHere
    Aug 26 '21 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.