troubleshooting Question MVC4 -- error messages ?

Avatar of finance_teacher
finance_teacher asked on
.NET ProgrammingC#ASP.NET
1 Comment1 Solution1105 ViewsLast Modified:
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>
I added the below to
but it did not work.

  Exception exc = Server.GetLastError();

    if (exc is HttpUnhandledException)
        if (exc.InnerException != null)
            exc = new Exception(exc.InnerException.Message);

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros