473,594 Members | 2,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3308
When a service stops this usually means an exception is being thrown or some
other problem.

Look in the "Administra tive 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******** *************@n ews.microsoft.c om...
When a service stops this usually means an exception is being thrown or
some other problem.

Look in the "Administra tive 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******** *************@n ews.microsoft.c om...
When a service stops this usually means an exception is being thrown
or some other problem.

Look in the "Administra tive 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******** *************@n ews.microsoft.c om...
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******** *************@n ews.microsoft.c om...
When a service stops this usually means an exception is being thrown
or some other problem.

Look in the "Administra tive 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
7162
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 Service in MMC. Is there any way to get arguments using this option? If possible, what framework method should I use to get an arguement? Thanks in advance. Eric
4
7119
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 executed, other necessary Windows Services have been terminated before it can actually send the mail. I've updated my HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services registry DependOnService value including SMPTSVC and others. My hope is...
5
14115
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 the service, i get the following error Error 1053: The service did not respond to the start or control request in a timely fashion 1. Is there anyway to extend the timeout period.? I use timed threads to load a serial device driver and this...
17
6424
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
6885
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 (which is the UI used to adjust the actions taken by, and the schedule of the service), then a privileged user thread should be used in the UI - no service required. But... "A windows service enables the creation of long-running executable
2
2250
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 the GUI for this service and the other windows non gui .NET clients. What's the best migaration pattern for us considering not to rewrite the thousands of lines of code. The question i have are the follows.
5
606
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 thread running at any given moment. Typically, timers will have an interval of 5 to 15 minutes. Conditionally, the interval may be set to 1 second (1000 ms) before the next call to Timer.Start(). Here is the question: if the interval is one...
2
2822
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 ActiveX control we're using (GrFinger for fingerprint reader)implements several event handlers. It is also my understanding that there is no Message Pump within a Windows Service. I suppose I could create my own message pump, but this seems...
41
11625
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 exits immediately with a start/stop/nothing to do error. What could be wrong?
5
3292
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? Why do I need to set a property within my code to the service name? Are all these required or am I just doing this for consistency purposes?
0
7880
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
8374
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
6665
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
5739
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
5413
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3868
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...
1
2389
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
1
1486
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.