title: How determine if application is web application
body: <p>In a core assembly, which is run both in a windows service, and in a web application, I need to store information per user session. The service will have a single user session, and the web application uses HttpContext.Current.</p>
  
  <p>I want to configure which method to use within the core assembly - convention over configuration. I want to do this only once, and I believe HttpContext.Current will be null when run from Application_Start.</p>
  
  <p>How can I reliably determine if the application is a web application?</p>