Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7782749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:38:18+00:00 2026-06-01T19:38:18+00:00

I’ve recently joined an asp.net mvc project well under way where there isnt much

  • 0

I’ve recently joined an asp.net mvc project well under way where there isnt much consistency in dealing with exceptions in the controller; some devs return data to the client to let the user know whats wrong, others throw them back so they get to the server-level handler that processes and logs them – without letting the user know whats up.

It seems obvious to me that both approaches are wrong on their own, and need to complement each other instead; what I’m stuck at, is how to do that. I assume the eventual exception handler / logger could redirect the user to an error webpage upon catching something particularly nasty, but that limits the mechanism to just severe stuff.

I’m kind of looking for a way to do both “throw” and “return …” at a time when I catch an exception, so I get it sorted and logged server side and get data client side that lets me tell the user there’s been a hiccup.

My expertise with asp.net is very limited, and while I believe I understand mvc enough for it to not be an issue, this is kind of a “what is the best practice?” question from someone working with people who dont bother with best practices much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:38:20+00:00Added an answer on June 1, 2026 at 7:38 pm

    There is a good project called Elmah for logging errors and exceptions in ASP.NET applications. You can find it here

    ELMAH (Error Logging Modules and Handlers) is an application-wide
    error logging facility that is completely pluggable. It can be
    dynamically added to a running ASP.NET web application, or even all
    ASP.NET web applications on a machine, without any need for
    re-compilation or re-deployment.

    Once ELMAH has been dropped into a running web application and
    configured appropriately, you get the following facilities without
    changing a single line of your code:

    • Logging of nearly all unhandled exceptions.
    • A web page to remotely
      view the entire log of recoded exceptions.
    • A web page to remotely view
      the full details of any one logged exception, including colored stack
      traces.
    • In many cases, you can review the original yellow screen of
      death that ASP.NET generated for a given exception, even with
      customErrors mode turned off.
    • An e-mail notification of each error at
      the time it occurs.
    • An RSS feed of the last 15 errors from the log.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.