1

I developed a windows forms application that logs the number of hours system was used.I deployed it on clients machine.It is working fine but whenever we ran the application for long time such as 24 hours or more,it is throwing the run-time errors.So how should I know the cause of run-time errors ?

Rajesh Pawde
  • 399
  • 2
  • 11
  • You should at least log somewhere the exceptions thrown with the stacktrace, that would be a start to investigate and try to reproduce the issue. – Ndech Oct 02 '14 at 06:47
  • @Ndech Thanks.But my application is desktop so log file will be generated on client machine and I may not access to those log files . – Rajesh Pawde Oct 02 '14 at 06:52
  • In that case you should provide an option for your users to be able to send you that data over the internet. For example, your application could reach a webpage passing as parameters the error description and that webpage should log the messages. – Ndech Oct 02 '14 at 06:56
  • Thanks Ndech,we can do that. – Rajesh Pawde Oct 02 '14 at 06:58

2 Answers2

1

RedGate SmartAssembly gives you out-of-the-box remote error reporting / stack trace collection. It allows you to catch exceptions and "phone home" with the trace. It also allows you to load up Visual Studio directly from the administration tool. I use it, and it works great.

There is no code to write, you just post-process your .NET assembly and choose your options. You can disable the obfuscation options if they cause any issues.

Otherwise, you can write that same functionality yourself with some time and effort.

codenheim
  • 20,467
  • 1
  • 59
  • 80
0

You could write errors to a log file or you check the events of windows in the event viewer