static Bootstrap() { ServiceLogManager.SetProvider(() => new Log4NetServiceLog("Dagent")); ServiceLocatorManager.SetProvider(() => new UnityServiceLocator()) // new MicroServiceLocator()) .Register(r => { ConfigurationManagerEx.GetSection <HostingSection>("hosting").Configure(r); var appSection = ConfigurationManagerEx.GetSection <AppSection>("appSection").Configure(r); if (appSection.Log4Net) { XmlConfigurator.Configure(); } HostingEnvironment.Initialize(); }); var o = ServiceLocatorManager.Current; }