MVC Application_start localhost redirected you too many times
<p>I get error: </p>

<blockquote>
  <p>localhost redirected you too many times. </p>
</blockquote>

<p>when I redirect to error page from <code>Application_Start</code> method.</p>

<p>my code looks like this: </p>

<pre><code> protected void Application_Start()
    {
        AreaRegistration.RegisterAllAreas();
        RouteConfig.RegisterRoutes(RouteTable.Routes);
    }

    protected void Application_Error(Object sender, EventArgs e)
    {    
        var exception = Server.GetLastError();   

        if (exception != null)
        {    
            Session["w"] = exception;
            Response.Clear();
            Server.ClearError();
            Response.Redirect("~/Admin/Error");    
        }
    }
}
</code></pre>