473,386 Members | 1,706 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.

Windows Service Question

I have a windows service project created with a timer that fires an event
over and over. I created an installer & the service appears to install
correctly. When I try to start the service I get a message that the service
started and stopped. Is there some setting I need to do to make the service
keep going until I tell it to stop?

Thanks,
Nathan
Nov 17 '05 #1
4 3272
When a service stops this usually means an exception is being thrown or some
other problem.

Look in the "Administrative Tools > Event Viewer"

In the application event log, you should find an entry with your service's
name.

-Brian
I have a windows service project created with a timer that fires an
event over and over. I created an installer & the service appears to
install correctly. When I try to start the service I get a message
that the service started and stopped. Is there some setting I need to
do to make the service keep going until I tell it to stop?

Thanks,
Nathan


Nov 17 '05 #2
Thanks, I was tring to run a trace to a file and file permissions were not
there. After removing this code and trying to reinstall the service I keep
getting a message that the specified service is marked for deletion. Does
this mean I need to reboot every time I retry my service?

Thanks,
Nathan

"Brian Corcoran" <fa**@email.com> wrote in message
news:28*********************@news.microsoft.com...
When a service stops this usually means an exception is being thrown or
some other problem.

Look in the "Administrative Tools > Event Viewer"

In the application event log, you should find an entry with your service's
name.

-Brian
I have a windows service project created with a timer that fires an
event over and over. I created an installer & the service appears to
install correctly. When I try to start the service I get a message
that the service started and stopped. Is there some setting I need to
do to make the service keep going until I tell it to stop?

Thanks,
Nathan


Nov 17 '05 #3
I've never had an error when uninstalling a service. The error is from InstallUtil.exe?

Can you post the error?

As a side note, when I write services, I put all the code I can in a DLL
project, and in the service project I just put the timer and event handling
to call the DLL. I also add a console app project, and I use the console
app to debug the DLL. This way you're not having to run the service to debug
the DLL if it has problems. Of course, this doesn't test everything, but
I find it very helpful.

--Brian

Thanks, I was tring to run a trace to a file and file permissions were
not there. After removing this code and trying to reinstall the
service I keep getting a message that the specified service is marked
for deletion. Does this mean I need to reboot every time I retry my
service?

Thanks,
Nathan
"Brian Corcoran" <fa**@email.com> wrote in message
news:28*********************@news.microsoft.com...
When a service stops this usually means an exception is being thrown
or some other problem.

Look in the "Administrative Tools > Event Viewer"

In the application event log, you should find an entry with your
service's name.

-Brian
I have a windows service project created with a timer that fires an
event over and over. I created an installer & the service appears
to install correctly. When I try to start the service I get a
message that the service started and stopped. Is there some setting
I need to do to make the service keep going until I tell it to stop?

Thanks,
Nathan


Nov 17 '05 #4
Brian,
I eventually got everything to work.

I had to manually delete the folder the project had installed to. I haven't
had a problem since.

I had previously used a windows form for a testing harness. Even the timers
were in the dlls. I had done some things that I wasn't allowed to do like I
had my database location saved in an xml file and was logging trace to a txt
file. I updated it to log the trace to sql and for the time being made the
connection string hardcoded.

I was able to get my service to work correctly. Thank you very much.

Nathan

"Brian Corcoran" <fa**@email.com> wrote in message
news:28*********************@news.microsoft.com...
I've never had an error when uninstalling a service. The error is from
InstallUtil.exe?

Can you post the error?

As a side note, when I write services, I put all the code I can in a DLL
project, and in the service project I just put the timer and event
handling to call the DLL. I also add a console app project, and I use the
console app to debug the DLL. This way you're not having to run the
service to debug the DLL if it has problems. Of course, this doesn't test
everything, but I find it very helpful.

--Brian

Thanks, I was tring to run a trace to a file and file permissions were
not there. After removing this code and trying to reinstall the
service I keep getting a message that the specified service is marked
for deletion. Does this mean I need to reboot every time I retry my
service?

Thanks,
Nathan
"Brian Corcoran" <fa**@email.com> wrote in message
news:28*********************@news.microsoft.com...
When a service stops this usually means an exception is being thrown
or some other problem.

Look in the "Administrative Tools > Event Viewer"

In the application event log, you should find an entry with your
service's name.

-Brian

I have a windows service project created with a timer that fires an
event over and over. I created an installer & the service appears
to install correctly. When I try to start the service I get a
message that the service started and stopped. Is there some setting
I need to do to make the service keep going until I tell it to stop?

Thanks,
Nathan


Nov 17 '05 #5

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

Similar topics

5
by: Eric Chong | last post by:
I created a Windows Service in C# that requires to get passed command arguments like a Console App. I noticed that there is an option "Start parameters" text box in the property of a Windows...
4
by: Bill Sonia | last post by:
I'm written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that once my send mail code is...
5
by: Richard Steele | last post by:
I have created a WinForm application that needs to be run as a windows service (the PC is inaccesible by any user) i have successfully installed the application as a windows service. When i start...
17
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
2
by: shyam | last post by:
I have a C++ COM based windows service which have more than 30k lines of code and which is stablized over years. We need to take the advantage of the ..NET framework for this project, especially...
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...
2
by: =?Utf-8?B?Sm9obiBG?= | last post by:
Hello All, I have a question about using an ActiveX control with a Windows Servce in C#. I believe it is not possible to properly setup an ActiveX control in a windows service as the particular...
41
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...
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...
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...

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.