title: Redirect user to his last visited page after session ends and relogin
body: <p>I am trying to implement an option that when a user times out, after he logs in again, he is redirected to the previous page he was in. The problem I seem to have is that I can't get the url of the page when session ends.
  I tried something like: </p>
  
  <pre><code>protected void Session_end(object sender, EventArgs e)
  {
      string userUrl = Request.Url.AbsoluteUri;
      Application["userUrl"] = userUrl;
  }
  </code></pre>
  
  <p>and on session start check if the url exists and redirect to it.</p>
  
  <pre><code>protected void Session_Start(object sender, EventArgs e)
  {
      try
          {
              string userUrl = Application["userUrl"].ToString();
          }
          catch
          {}
  }
  </code></pre>
  
  <p>The error i get is 'Request is not available in this context' on <code>string userUrl = Request.Url.AbsoluteUri;</code>
  . Can anyone please explain me what am I doing wrong?</p>