castle-windsor-3

Castle windsor lifestyle issue

纵饮孤独 提交于 2019-12-10 18:21:17
问题 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