473,385 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to define a global exception handler in a windows service?

I am having some difficulties implementing an UnHandledException
handler for the AppDomain.UnhandledException event in a windows
service for unhandled exceptions that occur on a System.Timers.Timer
elapsed event thread. I have just a few questions concerning the
AppDomain.UnhandledException event.

I have been to get my unhandledException handler to work correctly
when I generate an exception on the main service thread. However, my
global exception handler is not working when I generate an exception
in a thread that is created via the Timer elapsed event.

Going forward, I am going to implement a try/catch block in the timer
elapsed event but I am just curious to find out if there is a way to
implement a global exception handler in a windows service that
utilizes the system.timers.timer component.
1. Could someone explain to me how exceptions that occur on a
System.Timers.Timer thread are handled in relation to the main thread?

2. Is is possible to implement a global exception handler in a windows
service? Any suggestions?
Any information that can be provided will be greatly appreciated!

- Derek
Jul 19 '05 #1
0 2759

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MatthewRoberts | last post by:
Howdy All, I have a Windows Service that often stops in its tracks with no exception and no explanation on our QA system. During testing on the development machine, it can handle any workload,...
2
by: thechaosengine | last post by:
Hi everyone, Is there anyway to create some sort of catch-all in windows forms applications that could ensure that no unexpected exceptions bring down an application? For example, perhaps...
0
by: Chris Joslyn | last post by:
I am integrating some legacy VC++ 6.0 classes into a managed C++.NET Windows service. After I had the basic framework in place and running, I added in the source files I needed and tried to run the...
7
by: Adam J. Schaff | last post by:
I would like my windows service application to log all exceptions that occur, on any of its threads, to the windows event log. Is this possible? If so, can anyone give me an example of the...
0
by: Derek Wolf | last post by:
I am having some difficulties implementing an UnHandledException handler for the AppDomain.UnhandledException event in a windows service for unhandled exceptions that occur on a System.Timers.Timer...
3
by: kingski | last post by:
I have a web site created with ASP.NET 1.1. availability Global.asax: protected void Application_PreRequestHandlerExecute(Object sender, EventArgs e)
2
by: yeghia \(sosy\) | last post by:
Hi Guys I have two questions. 1. Is there a way to set a handler to .NET application so that in case of not caught exception my handler is called before application shutdown. I want to send an...
3
by: Simon Harvey | last post by:
Hi all, What is the best way to catch any and all exceptions when creating a windows service application? Is there some sort of global exception event I can use, or is it possible to surround...
6
by: Steve | last post by:
Hi All I have a windows forms Application (SAM) in vb.net 2008 using .net framework V2 One and only one customer out of 30 customers is getting errors daily where they have to close and...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.