Issue with webapi attribute routing.


Hi Team,

Recently I have upgraded to the GlobalLink 11.4.3 version. But after upgrade we are facing object not initialized issue in our application.

We have web api attribute routine defined in WebApiConfig.cs initialize model. See below code for reference,

public class WebApiConfig : IInitializableModule
public void Initialize(InitializationEngine context)
// Enable Web API routing
GlobalConfiguration.Configure(config =>

name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional });
/// <inheritdoc />
public void Uninitialize(InitializationEngine context)

config.MapHttpAttributeRoutes(); is creating problem with GlobalLink 11.4.3.

when I comment this line application works but the web api's not working. I tried to add this in register method and injected dependency in Application_Start methos as well but still its not working.

Please suggest something so that I can use GlobalLink latest version and attribute routine seemlessly in my application.


Rahul Dikkar

Jul 24, 2019 10:15

Hi Rahul,

Could you please attach the exact error here?



Jul 24, 2019 10:33
This exeception is coming on browsing.

System.InvalidOperationException: The object has not yet been initialized. Ensure that HttpConfiguration.EnsureInitialized() is called in the application's startup code after all other initialization code. 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)
Jul 24, 2019 11:39