473,386 Members | 1,873 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,386 software developers and data experts.

.NET C# Windows Service stop() problem

Hi,

We have a .Net project containing 1 Windows Application and 3 Windows services. The project is quite complex and is still in development. The services can be started and stopped by using the application. Also there are some timers in it which triggers the service on a specific time to start (scheduled). When the service done it stops itself so the resources come free.Though it is running fine since 4-5 months, now and than we get an error like:

Expand|Select|Wrap|Line Numbers
  1. System.InvalidOperationException: Cannot stop RIAnalyzer service on computer '.'. ---> System.ComponentModel.Win32Exception: De service kan momenteel geen besturingsberichten accepteren -English: The service isn't able to accept system messages-
  2.    --- End of inner exception stack trace ---
  3.    at System.ServiceProcess.ServiceController.Stop()
  4.    at RankInspectorController.Form1.timer4_Tick(Object sender, EventArgs e)
  5.  
It seems like the service is too bussy to handle the stop/start request. But it shouldn't! How can we pretend this from happening? I already tried to abort the Thread.
Jan 25 '08 #1
2 3228
leoiser
41
Are you sure while stopping time service is finshed or not?

Hi,

We have a .Net project containing 1 Windows Application and 3 Windows services. The project is quite complex and is still in development. The services can be started and stopped by using the application. Also there are some timers in it which triggers the service on a specific time to start (scheduled). When the service done it stops itself so the resources come free.Though it is running fine since 4-5 months, now and than we get an error like:

Expand|Select|Wrap|Line Numbers
  1. System.InvalidOperationException: Cannot stop RIAnalyzer service on computer '.'. ---> System.ComponentModel.Win32Exception: De service kan momenteel geen besturingsberichten accepteren -English: The service isn't able to accept system messages-
  2.    --- End of inner exception stack trace ---
  3.    at System.ServiceProcess.ServiceController.Stop()
  4.    at RankInspectorController.Form1.timer4_Tick(Object sender, EventArgs e)
  5.  
It seems like the service is too bussy to handle the stop/start request. But it shouldn't! How can we pretend this from happening? I already tried to abort the Thread.
Jan 29 '08 #2
Are you sure while stopping time service is finshed or not?
Yes I'm pretty sure. But what I want to achieve is that when the service is done, it stops it self. Also when the application(frontend) tells the service to stop, it just stops.
Jan 30 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Russ McDaniel | last post by:
Originally posted to microsoft.public.dotnet.distributed_apps with no response. Reposted here with additional thoughts. --- Hello, I'm writing a Windows service which performs some...
4
by: Keith | last post by:
I'm in the same boat as the fellow who posted this message back in August: Title : Windows Service, How does one make a service "fail" properly? Author : Ross Bennett Group :...
3
by: Jacob Crossley | last post by:
Hello all. We have about 10 Window's services that we wrote in c#. We use them to process row's that we have queued up in various SQL tables. The services seem to hang at least once in any given...
4
by: Kris | last post by:
I have a Windows Service in C# talking to a serial port and using Remoting. It also uses several COM objects. On customer's computer the service will occassionally hang somewhere - the service...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
2
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...
5
by: Primera | last post by:
I use the following method to stop the WMI service: string serviceName = "Windows Management Instrumentation" public static void stopService(string serviceName) { ServiceController services =...
5
by: Tom | last post by:
Using multiple System.Timers.Timer objects in a Windows Service for performing multi-thread activities in a periodic fashion. Timers are AutoReset=false, to only have a single timer execution...
7
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...
1
by: TJ | last post by:
I created a windows service using VS2005. I created/adjusted the install class using the designer controls. I set the user to be 'local system'. I installed the service using the VS2005 cmd...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
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,...
0
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,...

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.