title: Redirect to shared Error view from Global.asax on MVC unhandled exception
body: <p>I've been reading about the different ways to perform error handling in ASP.MVC.  I know about <code>try/catch</code> within a controller, and also about <code>[HandleError]</code> at controller-level.</p>
  
  <p>However, I am trying to perform global error handling for unhandled exceptions that could occur <strong>anywhere</strong> in the application (the <em>wow - we never expected a user to do that!</em> type of thing).  The result of this is that an email is sent to dev's:</p>
  
  <p>This is working fine:</p>
  
  <pre><code>protected void Application_Error()
  {
      Exception last_ex = Server.GetLastError();
      Server.ClearError();
      // send email here...
      Response.Redirect("/Login/Login");
  }
  </code></pre>
  
  <p>Elsewhere in the application, should an error occur in a controller, we have this logic which provides a friendly error in our error view:</p>
  
  <p><strong>Error Model</strong></p>
  
  <pre><code>namespace My.Models
  {
      public class ErrorViewModel
      {
          public string Summary { get; set; }
          public string Description { get; set; }
      }
  }
  </code></pre>
  
  <p><strong>Controller Code</strong></p>
  
  <pre><code>if(somethingBad){
      return View("Error", new ErrorViewModel { Summary = "Summary here", Description = "Detail here" });
  }
  </code></pre>
  
  <p>My question is, is it possible to redirect to the error view passing the <code>ErrorViewModel</code> from within Global.asax, e.g.</p>
  
  <pre><code>// send email here...
  Response.MethodToGetToView(new ErrorViewModel { Summary = "Error", Description = ex.Message });
  </code></pre>