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

Windows Service OnStart() not executing

I have a Windows Service. When I start the service from the Services window,
it indicates that the service started, but does not execute.

When I debug with a public method of Service1 that starts my thread (
_MyThread.Start(); ), then it executes, but not when I start from the
Services window.
--
Be Cool!
May 31 '07 #1
3 2001
In which context are you runing your servcice ?
Do you use any start parmater for your service ?

Any more detail erro under event log?

"thejackofall" wrote:
I have a Windows Service. When I start the service from the Services window,
it indicates that the service started, but does not execute.

When I debug with a public method of Service1 that starts my thread (
_MyThread.Start(); ), then it executes, but not when I start from the
Services window.
--
Be Cool!
Jun 1 '07 #2
Thanks for your reply.

I learned that my Windows Service was throwing an exception at the beginning
of my code where I wasn't expecting. It's fine now.

Thanks much.
J

--
Be Cool!
"calderara" wrote:
In which context are you runing your servcice ?
Do you use any start parmater for your service ?

Any more detail erro under event log?

"thejackofall" wrote:
I have a Windows Service. When I start the service from the Services window,
it indicates that the service started, but does not execute.

When I debug with a public method of Service1 that starts my thread (
_MyThread.Start(); ), then it executes, but not when I start from the
Services window.
--
Be Cool!
Jun 4 '07 #3
On Jun 4, 11:15 pm, thejackofall
<thejackof...@discussions.microsoft.comwrote:
Thanks for your reply.

I learned that my Windows Service was throwing an exception at the beginning
of my code where I wasn't expecting. It's fine now.

Thanks much.
J

--
Be Cool!

"calderara" wrote:
In which context are you runing your servcice ?
Do you use any start parmater for your service ?
Any more detail erro under event log?
"thejackofall" wrote:
I have a Windows Service. When I start the service from the Services window,
it indicates that the service started, but does not execute.
When I debug with a public method of Service1 that starts my thread (
_MyThread.Start(); ), then it executes, but not when I start from the
Services window.
--
Be Cool!- Hide quoted text -

- Show quoted text -
I was facing the same problem. It was due to an unwanted special
character in the config file.

Jun 4 '07 #4

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

Similar topics

8
by: Fabio Papa | last post by:
I am trying to write a windows service that sends emails to clients at specific times based on information in a sql db. Since this is done for multiple cities, I start a thread for each city and...
2
by: Chris | last post by:
Hi, Currently, I have a console application written in C# and an unmanaged legacy DLL written in VC++ 6.0. In the DLL's previous application, when an event occurs in the DLL, a windows message...
5
by: vinoth | last post by:
Hi, I have created WindowsService Project.In that Project OnStart Method i have written the following Code. In this code the Server is waiting for the connection from client. When the Client...
4
by: hogcods | last post by:
I'm having a strange problem with a service I developed. After installing the service on the target machine, I'm trying to start it using the Services admin window. I get the "Windows is starting"...
4
by: Groundskeeper | last post by:
I can't seem to get a custom UnhandledException handler working for a Windows Service I'm writing in VB.NET. I've read the MSDN and tried various different placements of the AddHandler call, to no...
7
by: Sunil Varma | last post by:
Hello all, I wrote a Windows Service in VC.NET 2005 I want to debug the solution. I tried as mentioned in the following link. ...
1
by: Sergey Krutous | last post by:
Can you please help me to resolve the following issue: I developed a windows service. At start up (I have overriden OnStart method) it connects to a web service and if the connection fails the...
2
by: Cubaman | last post by:
Hello everybody. I'm currently developing a windows service. In OnStart a launch two threads that carry on some work while the service is running. My problem comes from the fact that once the...
0
by: TonyJ | last post by:
Hello I'm rather new to this with windows service. I want to get a better understanding because I must use it if I don't want to use a console application- I have three important methods below....
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...

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.