Hi,
Has anyone successfully configured the shared instance of ExceptionlessClient using Web.config?
Legend has it that this should work.
ExceptionlessClient.Default.Configuration.ReadFromConfigSection();
My goal is to avoid duplicating configuration settings both in Web.config (which works well for unexpected exceptions and they are properly published) and in AppSettings. Ideally, I wouldn’t need to do this manually for exceptions that I catch myself:
ExceptionlessClient.Default.Configuration.Enabled = ApplicationSettings.ExceptionLessEnable;
ExceptionlessClient.Default.Startup(ApplicationSettings.ExceptionLessAppKey);
This would eliminate the need to define configurations separately in AppSettings.
Expected Behavior
• ExceptionlessClient.Default should read its configuration from Web.config automatically.
• No need to set values manually in code if they are already defined in Web.config.
Actual Behavior
• The configuration does not seem to be applied from Web.config, requiring explicit setup in code.
I'm using version 6, in a .NET 4.8 app.
For now, I also found a workaround with using ConfigurationManager.GetSection("exceptionless"), but it's forcing me to use reflection to access the properties, as the returned ExceptionlessSection is an internal class.
Thank you
Hi,
Has anyone successfully configured the shared instance of ExceptionlessClient using Web.config?
Legend has it that this should work.
My goal is to avoid duplicating configuration settings both in Web.config (which works well for unexpected exceptions and they are properly published) and in AppSettings. Ideally, I wouldn’t need to do this manually for exceptions that I catch myself:
This would eliminate the need to define configurations separately in AppSettings.
Expected Behavior
• ExceptionlessClient.Default should read its configuration from Web.config automatically.
• No need to set values manually in code if they are already defined in Web.config.
Actual Behavior
• The configuration does not seem to be applied from Web.config, requiring explicit setup in code.
I'm using version 6, in a .NET 4.8 app.
For now, I also found a workaround with using
ConfigurationManager.GetSection("exceptionless"), but it's forcing me to use reflection to access the properties, as the returnedExceptionlessSectionis an internal class.Thank you