MVC 4.0 good error message

I want to display  nice message in MVC 4.0 app if the URL entered by user does not match the registered routes.

Please advise the best method?
Who is Participating?
Imran Javed ZiaConnect With a Mentor Consultant Software Engineer - .NET ArchitectCommented:

You have to handle 404 page not found error simply.

just add following entry in web.config and add the required error page:

<customErrors mode="On" defaultRedirect="/system/problem">
    <error statusCode="404" redirect="/system/notfound" />

you may found following helpful:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.