public void Start() { Logger.Log(new LogEntry(LoggingEventType.Information, "Host: Start")); var locator = new TypeRepository(); var pviApp = locator.GetInstance <IPviProcessor>(); var factory = new TaskFactory(); factory.StartNew(() => pviApp.Connect(), TaskCreationOptions.LongRunning); WebApiApplication.Locator = locator; WebApiApplication.Logger = Logger; WebApiApplication.Start(); }