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 6468153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:51:48+00:00 2026-05-25T05:51:48+00:00

I configured HealthMonitoring in my web application to log all exceptions in the database.

  • 0

I configured HealthMonitoring in my web application to log all exceptions in the database.

But, when I gracefully handle some exception by showing a nice message to the user, they are not logged in the database. If I something like Throw ex, the standard error page is be displayed and the error is not gracefully handled.

Is there something else I could add at the end of my error handler to tell the system to also log this error?

here an code sample:

Dim errorText As String = "Doing Something"
Try
   'Do Something

Catch ex As Exception
        DataActionError.Text = String.Format("There was a problem {0}. ", errorText)
        DataActionError.Visible = True
        'add something here?
End Try

and the healthMonitoring section of my web.config :

<healthMonitoring enabled="true">
  <eventMappings>
    <clear />
    <add name="All Errors" 
         type="System.Web.Management.WebBaseErrorEvent"
         startEventCode="0" 
         endEventCode="2147483647" />
  </eventMappings>

  <providers>
    <clear />
    <add connectionStringName="MyConnectionString"
         maxEventDetailsLength="1073741823"
         buffer="false" 
         name="SqlWebEventProvider"
         type="System.Web.Management.SqlWebEventProvider" />
  </providers>

  <rules>
    <clear />
    <add name="All Errors To Database" 
         eventName="All Errors" 
         provider="SqlWebEventProvider"
         profile="Default" 
         minInstances="1" maxLimit="Infinite" 
         minInterval="00:00:00" />
  </rules>
</healthMonitoring>
  • 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-05-25T05:51:49+00:00Added an answer on May 25, 2026 at 5:51 am

    You can raise your own events which would then be consumed by the providers.
    You can’t raise a WebBaseErrorEvent yourself, but you can create a custom web event and tweak your configuration to capture it too.
    See
    http://msdn.microsoft.com/en-us/library/ms998306
    http://msdn.microsoft.com/en-us/library/ms227980.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I configured below exception resolver in my web configuration file but I am not
I configured Log4j to log into a file but it is instead logging to
I configured my web application like this link http://static.springsource.org/spring/docs/3.0.0.M3/spring-framework-reference/html/ch17s04.html My context <bean id=freemarkerConfig class=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer>
I have CruiseControl.NET configured to monitor 10+ .NET projects. All of these projects (web
I often plug pre-configured lambdas into enumerable methods like 'map', 'select' etc. but the
I've got it configured, but I want more from it...maybe Cygwin isn't the right
I configured now a new computer. Installed VS 2010 and all necessary component, got
I configured a default locale, and set up a text.properties + text_de.properties. <application> <locale-config>
I configured spring with transactional support. Is there any way to log transactions just
I have configured Reporting Services to allow users to use Report Builder application. Users

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.