title: Request is not available in this context
body: <pre><code>Exception Details: System.Web.HttpException: Request is not available in this context
  
  Source Error:
  
  Line 7:     Private Sub Application_Start(sender As Object, e As EventArgs)
  Line 8:     ' Caching the tracker image in memory
  Line 9:     Dim trackerImg As Byte() = File.ReadAllBytes(Context.Request.MapPath(ConfigurationManager.AppSettings("SD_Tut_ImageFileLocation")))
  Line 10:    Application(ConfigurationManager.AppSettings("SD_Tut_ImageFileKeyName")) = trackerImg
  </code></pre>
  
  <p>Error is in line 9</p>
  
  <p>This is the Global.asax Code</p>
  
  <pre><code>&lt;%@ Application Language="vb" %&gt;
  &lt;%@ Import Namespace="System.IO" %&gt;
  &lt;%@ Import Namespace="System.Collections.Generic" %&gt;
  &lt;%@ Import Namespace="Stardeveloper.Tutorial" %&gt;
  
  &lt;script runat="server"&gt;
     Private Sub Application_Start(sender As Object, e As EventArgs)
      ' Caching the tracker image in memory
      Dim trackerImg As Byte() = File.ReadAllBytes(Context.Request.MapPath(ConfigurationManager.AppSettings("SD_Tut_ImageFileLocation")))
      Application(ConfigurationManager.AppSettings("SD_Tut_ImageFileKeyName")) = trackerImg
  
      ' Creating a new request queue collection
      Dim queueCapacity As Integer = Convert.ToInt32(ConfigurationManager.AppSettings("SD_Tut_TrackerRequestsToCache"))
      Dim trackerReqQueue As New Queue(Of TrackerRequest)(queueCapacity)
      Application(ConfigurationManager.AppSettings("SD_Tut_TrackerCachedRequestsKeyName")) = trackerReqQueue
  End Sub
  
  Private Sub Application_End(sender As Object, e As EventArgs)
      ' Storing the queued tracker reqs to database
      Dim trackerReqQueue As Queue(Of TrackerRequest) = DirectCast(Application(ConfigurationManager.AppSettings("SD_Tut_TrackerCachedRequestsKeyName")), Queue(Of TrackerRequest))
      Tracker.FlushRequestQueueCache(trackerReqQueue)
  End Sub
  
  &lt;/script&gt;
  </code></pre>