title: Redirecting to another page on Session_end event
body: <p>I would like to auto-redirect to login page when session time outs. </p>
  
  <p>In web.config file, i have the following code</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;system.web&gt;
         &lt;sessionState mode="InProc"  timeout="1"/&gt;
      &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>In Global.asax file-</p>
  
  <pre><code>protected void Session_End(object sender, EventArgs e)
  {
      Response.Redirect("LoginPage.aspx");
  }
  </code></pre>
  
  <p>But after time-out, i am receiving the following error:</p>
  
  <blockquote>
    <p>HttpException was unhandled by user code.</p>
    
    <p>Response is not available in this context.</p>
  </blockquote>
  
  <p>Any clue to solve this issue?</p>