473,320 Members | 2,202 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,320 software developers and data experts.

c# service crashing

Hello,

I wrote a service which regularly checks a data archive and
contextualizes the data. This service runs fine on 2 separate computers,
both laptops (300 MHz and 600 MHz). When I installed the service on another
pc - 1.6 GHz, it will crash with:

**********

----Titlebar-----
Program Error
-----------------

EPACalculations.exe has generated errors and will be closed by Windows. You
will need to restart the program.

An error log is being created.

***********

I put the following code in my service, and cannot seem to trap the
error:

static void Main()

{
Thread.GetDomain().UnhandledException += new
UnhandledExceptionEventHandler EPAService_UnhandledException);
}

public stat void EPAService_UnhandledException(object sender,
UnhandledExceptionEventArgs e)
{
WriteToLog("[***] " + e.ToString());
}
.... and this code does not seem to trap the error. I do have error
logic, in simple try..catch statements within some of the methods. Wouldn't
this above code be a 'catch-all' for any unhandled errors?

Thanks in advance,

Andrew Mueller
Nov 15 '05 #1
0 937

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

Similar topics

7
by: Mike | last post by:
I want to create a windows service that will monitor another window service. what i need for the service to do is, if a service is stopped I need it to start the service back up example: ...
2
by: Razzie | last post by:
Hey all, I wrote a Windows Service. When I test it on my developement machine (winXP) it works fine. It starts ok, never crashes, etc. When I install the service on another machine (win2000) it...
23
by: Adam Clauss | last post by:
I have a C# Windows Service running as the NetworkService account because it needs to access a network share. As part of the service's initialization, I want the service to terminate, if an...
2
by: m11533 | last post by:
I have written an application that runs as a subprocess of a service, where the service is a .NET C# Windows Service that simply starts the subprocess and then periodically checks that the subprocess...
0
by: Lenny Shprekher | last post by:
We need a suggestion what to do with .NET services (written in earliest 2002 version) hangs without any reason. Starts happen more often recently, so we are guessing and thinking about some...
4
by: jf li | last post by:
I have a Asp.net web application and a Asp.net Web service application. The Web application is using HtmlInputFile to get a 50M size of file selected by end user, read the data of this file and...
17
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
4
by: Shawn Meyer | last post by:
A windows service that I developed is crashing unexpectedly. All the logging/ tracing that I implemented cannot seem to catch the crash. I am using multiple threads in many different areas. In...
4
by: Lenny Shprekher | last post by:
Hi, I have long time ago written windows service (VS2002) which is working fine on Windows 2000 server for 4 years. After installing service on Windows 2003 SP1 service crashing every time with...
9
by: Karthikeyan.T.S | last post by:
Hi, I am getting a error when I try to start a Windows Service. The error is "The XYZ service on local computer started and then stopped.Some services stop automatically if they have no work to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.