Castle windsor lifestyle issue
问题 I am implementing hangFire which is a job scheduling library in my project. I am facing the same issue as faced in this link However after replacing LifestylePerWebRequest() with HybridPerWebRequestTransient() I am still getting the same error message: HttpContext.Current is null. PerWebRequestLifestyle can only be used in ASP.Net Here's a couple of the lines of my dependency installer: container.Register(Component.For<IApiHra>() .ImplementedBy(typeof(ApiHra)) .LifeStyle