How can I change the below
\Views\Shared\Error.cshtml (etc)
to display REAL error messages ?
------------------------------------------------------------------------
@model System.Web.Mvc.HandleErrorInfo
@{
ViewBag.Title = "Error";
}
<hgroup class="title">
<h1 class="error">Error.</h1>
<h2 class="error">An error occurred while processing your request.</h2>
</hgroup>
------------------------------------------------------------------------
I added the below to
\Views\Shared\Error.cshtml
but it did not work.
Exception exc = Server.GetLastError();
if (exc is HttpUnhandledException)
{
if (exc.InnerException != null)
{
exc = new Exception(exc.InnerException.Message);
Server.Transfer("ErrorPage.aspx?handler=Application_Error%20-%20Global.asax",
true);
}
}
Our community of experts have been thoroughly vetted for their expertise and industry experience.