Hello,
I've written a (quite complicated) windows service using C# ,
starting from a wizzard generated project.Added custom installers,
installs and run just fine, does all the work it's supposed to do.
I do not change the CanStop propery anywhere in the code.
But the OnStop protected overriden method is never triggered, and
thus, my cleanup code is never executed.
Searching the Internet high and low, I could not find a similar
problem.Everyone seems to be getting their onstop just fine.
Today, I've put together a simple service, straight out of the
wizzard and with the bare/minimum installers added.Again, the OnStop
doesn't trigger.
Any ideas?
Thanks,
Jabba 2 4547
Sorry I can't offer any help, but I've had the same problem. the failure to
trigger the OnStop event and the inablity to easily debug the service
eventually led me to simply write a standard app instead. googling revealed
nothing of interest when I was still trying to figure it out. Although I
don't require it anymore, I'm still interrested in finding a solution to
this.
Chris LaJoie
Are you perhaps choking it out with too many cycles and not allowing
that thread to run? Are you using a very tight loop? Something like
for(;;){ ... }? are you erroring out? When a service throws an
exception it simply leaves the scope. No warning. No GUI. No nothing.
It just bubbles the error up to the main function or the first error
trap it finds. Are you using a premature return; statement? mc*****@iname.com (Jabba) wrote in message news:<58**************************@posting.google. com>... Hello, I've written a (quite complicated) windows service using C# , starting from a wizzard generated project.Added custom installers, installs and run just fine, does all the work it's supposed to do.
I do not change the CanStop propery anywhere in the code.
But the OnStop protected overriden method is never triggered, and thus, my cleanup code is never executed.
Searching the Internet high and low, I could not find a similar problem.Everyone seems to be getting their onstop just fine. Today, I've put together a simple service, straight out of the wizzard and with the bare/minimum installers added.Again, the OnStop doesn't trigger.
Any ideas?
Thanks, Jabba This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dmitri Shvetsov |
last post by:
Hi All,
Did somebody see the situation when the VS refuses to debug the Web Service
at all? I can't catch why, the initially created Web Service can be debugged
very easy but after some changes...
|
by: Craig Thompson |
last post by:
I've attempted to write a windows service that creates one FileSystemWatcher
for each entry in a XML config file. Everything start perfrectly and runs
as I expect for about 5 minutes and then...
|
by: Dhilip Kumar |
last post by:
Hi All,
I'm writing a Windows Service app using C#. I need to read some
configuration settings before the service starts up. These settings will be
used by the service in its operation. ...
|
by: Dhilip Kumar |
last post by:
Hi all,
I have developed a windows service using the windows service project
template in VS.NET. I have used three controls in the service, a timer,
performance counter and a message queue...
|
by: Nathan Kovac |
last post by:
I have a feeling I am missing something simple, but I just can't find it.
Perhaps someone can give me a lead on where to look. I will describe the
issue then post my code to the web service. My...
|
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...
|
by: Larry |
last post by:
Hello
I see that Windows Services are suppose to be able to run in their own background process. I can create simple Services based on the MSDN walkthrough, and get the OnStart/OnStop methods to...
|
by: zxo102 |
last post by:
Hi there,
I have a python application (many python scripts) and I start the
application like this
python myServer.py start
in window. It is running in dos window. Now I would like to put it...
|
by: kkt49 |
last post by:
# vim: et sw=4 ts=8 sts
from wxPython.wx import *
import sys, os, time
import pywintypes
import win32serviceutil
import win32service
import win32event
import win32process
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
|
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...
| |