title: Not hitting error page on ASP.NET 5 app
body: <p>I'm playing with a new ASP.NET 5 MVC 6 app. So far, it's an empty, out-of-the-box application Visual Studio creates when ASP.NET 5 MVC project is selected.</p>
  
  <p>In the Home controller action, I added the line to see if I'd get redirected to the generic error page i.e. ~/Views/Shared/Error.cshtml</p>
  
  <pre><code>throw new UnauthorizedAccessException("Test exception!");
  </code></pre>
  
  <p>When I run the project, all I get is an exception in my code but don't get redirected to the error page.</p>
  
  <p>The following is the standard Startup.cs -- again, out-of-the-box code. I didn't make any changes yet.</p>
  
  <pre class="lang-cs prettyprint-override"><code>public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
  {
      loggerFactory.AddConsole(Configuration.GetSection("Logging"));
      loggerFactory.AddDebug();
  
      if (env.IsDevelopment())
      {
          app.UseBrowserLink();
          app.UseDeveloperExceptionPage();
      }
      else
      {
          app.UseExceptionHandler("/Home/Error");
      }
  
      app.UseIISPlatformHandler();
  
      app.UseStaticFiles();
  
      app.UseMvc(routes =&gt;
      {
          routes.MapRoute(
              name: "default",
              template: "{controller=Home}/{action=Index}/{id?}");
      });
  }
  </code></pre>
  
  <p>Shouldn't I get redirected to the error page?</p>