Posted on: 12/17/2015 12:52:11 PM | Views : 1854

I'm using hangfire and for DI using autofac. i want to send email with postal.mvc5 tools and i got this error:
System.InvalidOperationException The request lifetime scope cannot be created because the HttpContext is not available. System.InvalidOperationException: The request lifetime scope cannot be created because the HttpContext is not available. at Autofac.Integration.Mvc.RequestLifetimeScopeProvider.GetLifetimeScope(Action`1 configurationAction) at Autofac.Integration.Mvc.AutofacDependencyResolver.get_RequestLifetimeScope() at Autofac.Integration.Mvc.AutofacDependencyResolver.GetService(Type serviceType) at System.Web.Mvc.BuildManagerViewEngine.DefaultViewPageActivator.Create(ControllerContext controllerContext, Type type) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at Postal.EmailViewRenderer.RenderView(IView view, ViewDataDictionary viewData, ControllerC ...

Go to the complete details ...