title: How to get Controller context outside http request .e.g in background service
body: <p>I have a task to send email which contain Html view once in a day.
  I created a background service for it using hangfire.
  The problem is that when i render view to string it requires controller context which is null in this case.</p>
  
  <p>I have followed below tutorial which say you can create controller context
  <a href="https://www.codemag.com/Article/1312081/Rendering-ASP.NET-MVC-Razor-Views-to-String" rel="nofollow noreferrer">https://www.codemag.com/Article/1312081/Rendering-ASP.NET-MVC-Razor-Views-to-String</a></p>
  
  <p>But the problem is that HttpContext.Current is null too in this case.
  How can i use HttpContext in background jobs?</p>