How is the best way to handle any occuring errors in a Sivlerlight application?
I am not talking about error handling in a development environment.
But what would be the best way to log errors and look them up for fute reference?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
The technique I use is logging to both the server, and client. You do this through one entry point, a
Logclass with a number of static methods, or a singleton if you prefer. This can then be configured to do just client logging, just server, both or none.The client log can then be displayed in a non-panic inducing dialog, where the full stacktrace is available in a toggle’able text box. This obviously allows for exceptions to be caught if the web service is down, or broken. It also lets the user copy the stacktrace and email it you if they’re particularly irate.
Although server logging (for example with Log4Net) is more powerful as it gives a lot more options for logging including email alerts, it does rely on you being able to find the exception for the particular person, which requires additional search tools or knowledge in the case of the event log.
Having the addition of client logging to fall back on (with server logging on as well) is in my view a worthwhile extra feature.