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

Home Posts Topics Members FAQ

c# windows service does not work

following this tutorial

http://www.c-sharpcorner.com/UploadF...w_service.aspx

installutil seems to complete successfully, but the service is not listed in
services, and trying NET START servicename returns "the service name is
invalid"

im running on vista... any ideas?

Jul 12 '07 #1
5 5168

"S Moran" <s@moran.comwro te in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
following this tutorial

http://www.c-sharpcorner.com/UploadF...w_service.aspx

installutil seems to complete successfully, but the service is not listed
in services, and trying NET START servicename returns "the service name is
invalid"

im running on vista... any ideas?
Did you reboot the machine to see if it showed up?
Jul 12 '07 #2
no the problem was that the article (forgot?) to mention that you need to
add an installer to the service

"Mr. Arnold" <MR. Ar****@Arnold.c omwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>
"S Moran" <s@moran.comwro te in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>following this tutorial

http://www.c-sharpcorner.com/UploadF...w_service.aspx

installutil seems to complete successfully, but the service is not listed
in services, and trying NET START servicename returns "the service name
is invalid"

im running on vista... any ideas?

Did you reboot the machine to see if it showed up?

Jul 12 '07 #3

"S Moran" <s@moran.comwro te in message
news:eI******** ******@TK2MSFTN GP04.phx.gbl...
no the problem was that the article (forgot?) to mention that you need to
add an installer to the service
The article talked about the installer, where you go to the Command Prompt
and use InstallUtil. You can have an installer in the project for the
service, but you don't need one, if you are using InstallUtil, which can
also be used to uninstall the service -- InstallUtil servicename.exe -u.
Step 3: Install and Run the Service

Build of this application makes one exe, mcWinService.ex e. You need to call
installutil to
egister this service from command line.
installutil C:\mcWebService \bin\Debug\mcWe bService.exe
You use /u option to uninstall the service.
installutil /u C:\mcWebService \bin\Debug\mcWe bService.exe
Run the application

Jul 12 '07 #4
no... without the installer class, installutil does NOT work.
i just verified this... unless theres some way i dont see


"Mr. Arnold" <MR. Ar****@Arnold.c omwrote in message
news:Oa******** ******@TK2MSFTN GP06.phx.gbl...
>
"S Moran" <s@moran.comwro te in message
news:eI******** ******@TK2MSFTN GP04.phx.gbl...
>no the problem was that the article (forgot?) to mention that you need to
add an installer to the service

The article talked about the installer, where you go to the Command Prompt
and use InstallUtil. You can have an installer in the project for the
service, but you don't need one, if you are using InstallUtil, which can
also be used to uninstall the service -- InstallUtil servicename.exe -u.
Step 3: Install and Run the Service

Build of this application makes one exe, mcWinService.ex e. You need to
call installutil to
egister this service from command line.
installutil C:\mcWebService \bin\Debug\mcWe bService.exe
You use /u option to uninstall the service.
installutil /u C:\mcWebService \bin\Debug\mcWe bService.exe
Run the application
Jul 13 '07 #5

"S Moran" <s@moran.comwro te in message
news:u0******** ******@TK2MSFTN GP02.phx.gbl...
no... without the installer class, installutil does NOT work.
i just verified this... unless theres some way i dont see
I have installed some .Net Services, and I don't ever recall placing a
installer in the Service Project, as a matter of fact I took it out, because
it was giving me problems.

Granted, that was with .Net 2003 and framework 1.1. I have not done one
using .Net 2005 and framework 2.0, which I also have never had to install a
log file either with the installer. I just created the log file on the fly
when the service started up and checked if it alread exist and not to create
it on the start of the service, without using the installer with .Net 2003.
Jul 13 '07 #6

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

Similar topics

2
21875
by: Mark | last post by:
I created an extremely simple windows service that only writes to the EventLogs on Stop and Pause. I installed it using the InstallUtil.exe program, the output of which is below. It appears to be successful. I'm now ready to start my service (I think) but the NET START command does not appear to indicate that the service is available to be run. The output for NET START is below as well. The Services list in the W2K administrator...
9
7250
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service stopping. Please advise how to stop the service. Thanks, SP
4
4790
by: Julia | last post by:
Hi, I have two application which 'evaluate'( New FileStream(path....) relative path, when evaluating the path inside a window service it always return something like C:\\WINNT\SYSTEM32\MyPath While when evaluating it in a window application I get the correct path
3
2491
by: mpriem | last post by:
Hi, I am developing my very first Windows Service. I want to query AD every 5 minutes to generate a Report which I will use in a website. I use the following testcode, but the service won't start in a timely fashion. What am I doing wrong? using System; using System.IO;
2
4095
by: Peter Meinl | last post by:
Restarting Windows seems not to fire the OnShutdown event in the Windows Service. Does not work on Windows XP SP2 and not on Windows 2003 Server SP1. OnStart and OnStop do work fine. Steps to reproduce: Create a Windows service in VB.NET using VS 2005. Set CanShutdown property to true.
1
2847
by: Steffer [MCP] | last post by:
Hi NG I'm have made a server application (WinForms) but I would very much like to move the tasks that my app runs into a Windows Service. But have you any experience building an communication interface between the Gui and a Windows Service, I'd like to hear from you. Is the solution: Sockets - with commands and data send directly
1
1065
by: lm2b2005 | last post by:
Hi I've written, installed, started and debugged my vb.net 2005 windows service and all works fine. But only while I am debugging it in Visual studio 2005. Any idea how I can get my WS to work while not debugging it with Visual Studio open?
3
4594
by: Jake K | last post by:
I have a multithreaded application that I now want to convert into a Windows Service. Does application.run work in a windows service? Are there things to take into consideration when creating a multithreaded windows service as opposed to a multithreaded windows forms application? E.G. namespace whatever {
1
2314
by: hemant | last post by:
I am trying to Caputre the screen in windows service with the GDI Api of Win32 in vb.net 1. CreateDc 2. CreateCompatibleDC 3. CreateCompatibleBitmapDc 4. Bitblt 5. SelectObject 6. DeleteDc The Caputured screen file is always black
0
7946
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
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...
1
8009
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8240
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
6661
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
3867
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
1482
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.