473,748 Members | 6,037 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Don't stop a windows service until ....

i do some job in timerBaseIntern et.Elapsed

but i don't want to stop the service until this job is finished...

What can i do for this ?

and i can't use canStop to false cause it's only when service is not
running...

any idea ?

Nov 17 '05 #1
4 1934
Hi,

not very sure what you mean

IF you use a timer and you want to stop the timer while processing you can
do so by disabling the timer while you do the procesing.

Is this what you want?
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"ucasesoftw are" <uc***********@ hotmail.fr> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
i do some job in timerBaseIntern et.Elapsed

but i don't want to stop the service until this job is finished...

What can i do for this ?

and i can't use canStop to false cause it's only when service is not
running...

any idea ?

Nov 17 '05 #2
thx for help but no

in my .Elapsed i update a database

When the users exit my software... they close the Windows Service...

But if they do when i update my database i have a serious problem...

so i need to wait that the update is finished to close my windows
service

understand ?

Nov 17 '05 #3
This doesn't sound right. A Windows Service is an application that starts
with the operating system, even when no user is logged on. Yet you are saying
that when users "exit your software" they close the Windows Service....
Could you be more specific?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"ucasesoftw are" wrote:
i do some job in timerBaseIntern et.Elapsed

but i don't want to stop the service until this job is finished...

What can i do for this ?

and i can't use canStop to false cause it's only when service is not
running...

any idea ?

Nov 17 '05 #4
my windows service update a database : local msde => sqlserver internet

so when nothing is doing in the software... the service have no job...
so i stop it...

but if the service is stopping when my database is update... i could
have some errors...

Nov 17 '05 #5

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

Similar topics

2
5292
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...
11
14975
by: Frank Rizzo | last post by:
Hello, My c# based windows service takes a while to dispose. I have to release bunch of resources all over the place and unfortunately it can take 20-40 seconds before I can cleanly exit. Every now and then, when I stop the service from the Services applet, it will timeout and bring up an error message saying that the service isn't responding.
2
7865
by: Nathan | last post by:
I have created a windows service but am having difficulties handling exceptions in the OnStart. What I want to do is if an exeception occurs during any of the code executed during the OnStart is to log the problem and stop the service. I've already sorted out the logging of the problem to the event log but the suggested solution I have implemented for stopping the service does not work. Currently I declare a ServiceController and set...
2
7215
by: MA | last post by:
Hi all! I have developed a webservice that writeing and reading files in different folders. I need to be able to start and stop this service by using a web interface (start and stop button). But I can´t find any way to this. Any ideas? And where can I see if this service is running? /Marre
7
7230
by: shai | last post by:
I am working at .net 1.1, writing in c#. I have windows service with a COM object. Every unexpected time The COM object throw an error that make my service get stuck (do not respond). I can catch this error. I want to restart my windows service every time the COM object throws an error. I use System.ServiceProcess.ServiceController to stop and start my service. But there is one thing I do not understand:
5
12802
by: darthghandi | last post by:
I've created a class to listen to all interfaces and do a BeginAccept(). Once it gets a connection, it passes the connected socket off and stores it in a List. Next, it continues to listen for more incoming connections and does the BeginAccpet() again. It does an infinite loop this way. My question is: What is the best way to stop this? I thought about putting a boolean in there, but then what if it's still waiting for an incoming...
0
2195
by: mattcfisher | last post by:
Hi, I have two windows services running together. One is the main program, and one is an "updater" wrapper for the main. The updater service starts and stops the main one (as in you should never start or stop main service manually, only updater). On most computers it works great, the updater's onStop() can start and stop the main service perfectly. On some computers, though, the updater hangs when it tries to stop the main service. It...
0
1324
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I have a windows application that does not stop running whenever the application exits. Could someone fill me in on what I am doing wrong? Here is the relevant code: ================================= Private m_thTCP As Thread Private m_listener As TcpListener
3
1668
by: mahenderp | last post by:
Hi, I''m developing a windows service using C#.Net, which runs in System Account. I don't want that service to be stop manually and I don't want anybody to terminate / kill my service at any cost. If at all, he/she is terminating/killing/stopping the service is done ... I need to send a email. Can anybody help me out with this....
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
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
9372
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9247
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8243
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
6796
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
4606
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
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
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

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.