From 2b67a3b4b2fb3f9eae6ba7bf915a18de0d6ed62f Mon Sep 17 00:00:00 2001 From: dsanz Date: Thu, 2 Mar 2017 16:17:20 +0100 Subject: [PATCH] Fix link to error view --- .../eShopWeb/Controllers/CatalogController.cs | 7 ++++++- src/Web/WebMonolithic/eShopWeb/Startup.cs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Web/WebMonolithic/eShopWeb/Controllers/CatalogController.cs b/src/Web/WebMonolithic/eShopWeb/Controllers/CatalogController.cs index 8def61676..79b270314 100644 --- a/src/Web/WebMonolithic/eShopWeb/Controllers/CatalogController.cs +++ b/src/Web/WebMonolithic/eShopWeb/Controllers/CatalogController.cs @@ -65,6 +65,11 @@ namespace eShopWeb.Controllers Byte[] b = System.IO.File.ReadAllBytes(path); return File(b, "image/png"); - } + } + + public IActionResult Error() + { + return View(); + } } } diff --git a/src/Web/WebMonolithic/eShopWeb/Startup.cs b/src/Web/WebMonolithic/eShopWeb/Startup.cs index dd05db55f..3a9e876e6 100644 --- a/src/Web/WebMonolithic/eShopWeb/Startup.cs +++ b/src/Web/WebMonolithic/eShopWeb/Startup.cs @@ -63,7 +63,7 @@ namespace eShopWeb } else { - app.UseExceptionHandler("/Home/Error"); + app.UseExceptionHandler("/Catalog/Error"); } app.UseStaticFiles();