title: Asp.net System.Web.HttpContext.Current.Session null in global.asax
body: <p>I have a custom security principal object which I set in the global.asax for the current thread and all is well, no problems normally.</p>
  
  <p>However, I'm just adding a dynamic image feature by having a page serve up the image and whenever that dynamic image page is loaded the System.Web.HttpContext.Current.Session is null in global.asax which prevents me from setting the security principal as normal and cascading problems from that point onwards.</p>
  
  <p>Normally the Session is null in global.asax only once during a session at the start when the user logs in, afterwards it's always available with this single exception.</p>
  
  <p>The dynamic image page is loaded when the browser comes across an image tage in the original page i.e. </p>
  
  <p>I'm guessing that this is some aspect of the fact that the browser is requesting that page without sending some credentials with it?</p>
  
  <p>Any help would be greatly appreciated.</p>