WPF errors when offline

aloevera

Posted on
Jan 23 2018

Hi there,

I just wanted to find out the expected behaviour when using Raygun with WPF offline.

I understood that errors would be cached and sent when connection resumed. What do I need to do for this behaviour to work. I'm getting System.Net.WebException: 'The remote name could not be resolved: 'api.raygun.io'' and then the app crashes.

Is some more handling required?

Thanks in advance!


Jason Fauchelle

Raygun

Posted on
Jan 23 2018

Hi aloevera,

Do you know if the application is crashing due to Raygun4Net, or is the exception it's trying to report causing the crash? i.e. if you disable Raygun4Net, does the app still crash? If it is caused by Raygun4Net, I wonder if you've set the ThrowOnError setting to true. This causes any try catch blocks in Raygun4Net to throw the caught exception which can be useful for local debugging.

If Raygun4Net can not send the report, then it will cache the report in isolated storage, as long as that's available. Raygun4Net will not listen to when a connection is restored, but instead will re-attempt sending cached reports the next time that a new report succeeds to be sent, or when the application starts up again.

-Jason Fauchelle


bgx

Posted on
Jan 23 2018

Hi,

Is there a way to check if Raygun has cached exceptions and send them on demand when our client recognizes that it is online again?

Our clients are long running processes, potentially not restarting for very long times if the machine keeps running or the user Hibernates between sessions. We don't expect many errors, and if the error is only re-sent when the app starts or another error occurs we may not get it for weeks...


Jason Fauchelle

Raygun

Posted on
Jan 24 2018

Hi bgx,

Thanks for the suggestion. Raygun4Net currently does not expose a way to do this. We could look at providing a way to do this, or more conveniently, provide an option for Raygun4Net to do this for you. I would recommend posting this as an issue on the Raygun4Net repository so that it can be considered in a future release: https://github.com/MindscapeHQ/raygun4net/issues

-Jason Fauchelle


bgx

Posted on
Jan 24 2018

Thanks Jason, I added an issue at https://github.com/MindscapeHQ/raygun4net/issues/375


Reply