473,790 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Service starts then stops

Hi, hope somebody can help...
I have created a service which has a filesystemwatch er as its main
component, it then logs information received in the events to an access
database. I was using a setup project to install it, then attach to its
process, very successfully for quite a while, I was almost thinking how well
it was behaving - now whatever I do, whenver it starts it gives me a message
along the lines of "the service started then immediately stopped again. Some
services do do this, such as the Performance logs and alerts service."
I can't debug it as i can't get its process to run for long enough to
attach to, as the message box pops up immediately.

I have no idea what I have changed to make it do this. I have tried every
possible combination of property settings, even started a whole new project
and imported the code into it- no success. it is very annoying... what has
gone so incredibly wrong that it just refuses to run?

Nov 16 '05 #1
1 5435
Well thanks for all your great suggestions.
As it happens what had happened was that the service was throwing an exception on startup, and it couldn't log it to the event log because the exception was being thrown because it had filled up the event log. Chicken and egg situation to resolve you'd think.... took me 2 bloody hours to solve that


"Beeeeeves" wrote:
Hi, hope somebody can help...
I have created a service which has a filesystemwatch er as its main
component, it then logs information received in the events to an access
database. I was using a setup project to install it, then attach to its
process, very successfully for quite a while, I was almost thinking how well
it was behaving - now whatever I do, whenver it starts it gives me a message
along the lines of "the service started then immediately stopped again. Some
services do do this, such as the Performance logs and alerts service."
I can't debug it as i can't get its process to run for long enough to
attach to, as the message box pops up immediately.

I have no idea what I have changed to make it do this. I have tried every
possible combination of property settings, even started a whole new project
and imported the code into it- no success. it is very annoying... what has
gone so incredibly wrong that it just refuses to run?

Nov 16 '05 #2

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

Similar topics

4
2145
by: yabba | last post by:
w2k server... after rebooting the event viewer/application log shows multiple restarts of Active Server Pages and they continue to build in memory as each start produces a IWAM_SERVERNAME in the task manager. there might be 10 - 20 starts without a stop... when I restart iis services it takes a long time as each started service is stopped and the associated IWAM_SERVERNAME is closed. this seems to be something new and when checking...
2
5294
by: 0to60 | last post by:
I have a windows service that when started creates two threads: one thread that runs a TcpListener waiting for TcpClients to connect, and another thread that reads from the resulting sockets. My stop code .Abort()s the threads and .Stop()s the listener. One one of my computers, the service runs like, well...a service. It starts and stops nicely. On a different computer (eventually this service will be running on 50+ machines) the...
7
712
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: service 1 - my service watches service 2 - windows service service 2 is stopped - service 1 starts service 2
0
4048
by: Eugene | last post by:
I have two window services that I created in C# and VB.net, one each, and set them to manual startup type. However, sometimes (not everytime) when I starts the service, an error message pops-up to say the service started and stopped automatically. ----------------------------------------------------------------------------------------------- The dicer service on Local Computer started and then stopped. Some services stop automatically if...
4
2148
by: ZQ | last post by:
Hi all! I have few questions regarding .net windows services 1. are onStart, onStop and other "system" events invoked in separate threads than msmq events? 2. if so, is there a way for the onStop event to wait with stopping the service until pending msmq events are finished? 3. if not, does that mean that the onStop event would actually be invoked after all pending events are finished?
0
2129
by: JM | last post by:
I have created simple windows service which just write message to event log when it starts and stops. I am able to install it succesfully using: installutil <service_file.exe>, where <service_file.exeis the executable of the service. (Thanks to Rohan). But I want to install it using VS 2005 Setup project and I am unable to do that. I have created a Solution in VS 2005 with 2 simple projects.
1
1373
by: Celldss | last post by:
I have a .Net service (VB - 1.1 SP1) deployed in our environment that is experiencing an odd issue. The service does a series of file & registry based checks, logs to the event log and uploads the results to an Oracle database. However, a few clients (a couple hundred or so out of tens of thousands) are experiencing a rather odd issue. The service is configure to fire it's checks every 48 hours (using a timer), or whenever the service...
10
1943
by: Ryan | last post by:
Hello everyone, I have made a service that starts timers when it starts. I have another windows form application that stops and starts the service. Do I need to deal with any started timers when the service stops? Being new at this service stuff, I don't know if it holds state or memory and I need to stop all active timers or if the magical gc will come along and help out. Thanks, I hope that makes sense.
41
11663
by: pbd22 | last post by:
Hi. I know my windows service works when i run it in debug mode on my dev machine. It also works in release mode on my dev machine. But, when I move the service to a production server, it exits immediately with a start/stop/nothing to do error. What could be wrong?
0
9512
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10419
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9023
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6770
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5552
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4100
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.