Plugins.Monitoring causes white screen after handling an exception

Apr 1, 2011 at 5:01 PM

I just found this not sure if this is a known issue.  My silverlight project had a reference to the SMF...Plugins.Monitoring assembly I noticed I was getting a white screen even after handling an unhandled exception.  I normally display  a error box to the user but this had stopped working.  After lots of debugging I started ripping out references and noticed after removing the reference to this plugin the problem was fixed.  When I would debug I would end up in my UnhandledException code below but I would always get a white screen of death after leaving the method.  Removing the monitoring assembly fixed the issue.  


        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
                    e.Handled = true;

            catch (Exception)

Apr 1, 2011 at 5:22 PM

andyb13, thanks for bringing this up. This is partly by design, partly a bug, and I have an easy workaround.

First, the part that is by design: the monitoring plugin can automatically log unhandled exceptions. This is enabled by default but e.Handled is set to false by default in order to let the main app handle the exception. The good news is that these behaviors can be controled through a config file (see the workaround below).

The bug: If your own app handles the ApplicationException event first and sets e.Handled = true, the monitoring plugin will go and set this back to false (depending on the config). It should set it to false only if your app has not handled it. I will make sure this is addressed in the next release (SMF 2.5) due in a couple weeks.

The workaround: create a monitoringconfig.xml file and change PreventUnhandledExceptions = 1:


Please refer to for more info on how to create a use a custom MonitoringConfig.xml file.
Apr 1, 2011 at 5:30 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Apr 1, 2011 at 9:02 PM

Great Tim thanks for the workaround!