Search code examples
c#windows-servicesexceptionerror-reporting

Best way for a .Net Windows service to report an error to the user


I am writing a windows service that will be doing a lot of network communication, and I need a way to notify a user (if logged on) of any exceptions/errors. I know it is bad practice to allow a service to interact with the desktop, so is there an alternative way to notify a user that an error has occurred? I am aware of event logging, but I would also like to be able to show a notification bubble from the system tray or something that catches the user's attention.


Solution

  • Please consider using Event Log and a separate application just for monitoring. You can also consider using emails or MSMQ.