title: Why is HttpContext.Current sometimes null when using ASP.NET ReportViewer?
body: <p>In our ASP.NET Web Application, we have a service with a life-time/scope that can described as "instance per request" i.e. the instance is stored in the <code>HttpContext.Current.Items</code> collection.</p>
  
  <p>We have had this intermittent issue where the <code>HttpContext.Current</code> property is <code>null</code> during calls from the ASP.NET <code>ReportViewer</code> control. Sometimes it is <code>null</code>, sometimes it is not. The behaviour can be different on the staging website versus a dev machine, and even varies between different dev machines. </p>
  
  <p>This will cause a report which would like to use our service to throw an exception.</p>
  
  <p>Why is the <code>HttpContext.Current</code> property <code>null</code>?</p>
  
  <p>Why is it intermittent? </p>