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

Services

Hi

I'm trying to write a service. It's a pretty simple thing at the moment that just writes to the EventLog, just so I can get my head around the basics of writing Services. It's compiled fine in Visual Studio, but I'm having a bit of bother getting it to run

Visual Studio says to use InstallUtil.exe to install the service first, so I used it as follows

installutil /AssemblyName myServic

Which appeared to run fine, but the service does not appear in my services list, and I found the following in the install log

No public installers with the RunInstallerAttribute.Yes attribute could be found in the c:\blahblah\myService.exe assembly
Remove InstallState file because there are no installers

I assume this is the reason why it doesn't appear in the services list. What should I be doing differently? There doesn't appear to be a lot of help in the docs for this

Burns
Nov 15 '05 #1
3 8602
Hi,

You need to add an Installer class to the project (the wizard will show this
as one of the choices) and then add a ServiceProcessInstaller and a
ServiceInstaller component to the Installer. Read the docs on these and it
will become clearer.

Cheers

Doug Forster

"Burns" <an*******@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
Hi,

I'm trying to write a service. It's a pretty simple thing at the moment that just writes to the EventLog, just so I can get my head around the
basics of writing Services. It's compiled fine in Visual Studio, but I'm
having a bit of bother getting it to run.
Visual Studio says to use InstallUtil.exe to install the service first, so I used it as follows:
installutil /AssemblyName myService

Which appeared to run fine, but the service does not appear in my services list, and I found the following in the install log:
No public installers with the RunInstallerAttribute.Yes attribute could be found in the c:\blahblah\myService.exe assembly. Remove InstallState file because there are no installers.

I assume this is the reason why it doesn't appear in the services list. What should I be doing differently? There doesn't appear to be a lot of
help in the docs for this.
Burns

Nov 15 '05 #2
There is a good sample there:

http://www.dotnetcoders.com/web/lear...sservices.aspx

José

"Doug Forster" <doug_ZAPTHIS_AT_TONIQ_ZAPTHIS_co.nz> a écrit dans le message
de news:O3**************@TK2MSFTNGP10.phx.gbl...
Hi,

You need to add an Installer class to the project (the wizard will show this as one of the choices) and then add a ServiceProcessInstaller and a
ServiceInstaller component to the Installer. Read the docs on these and it
will become clearer.

Cheers

Doug Forster

"Burns" <an*******@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
Hi,

I'm trying to write a service. It's a pretty simple thing at the moment that just writes to the EventLog, just so I can get my head around the
basics of writing Services. It's compiled fine in Visual Studio, but I'm
having a bit of bother getting it to run.

Visual Studio says to use InstallUtil.exe to install the service first,

so I used it as follows:

installutil /AssemblyName myService

Which appeared to run fine, but the service does not appear in my
services list, and I found the following in the install log:

No public installers with the RunInstallerAttribute.Yes attribute could
be found in the c:\blahblah\myService.exe assembly.
Remove InstallState file because there are no installers.

I assume this is the reason why it doesn't appear in the services list.

What should I be doing differently? There doesn't appear to be a lot of
help in the docs for this.

Burns


Nov 15 '05 #3
Cheers man, that did the trick.
Nov 15 '05 #4

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

Similar topics

4
by: rbt | last post by:
How does one associate a "Description" with a Windows service written in Python? I've just started experimenting with Python services. Here's my code... copied straight from Mr. Hammond's "Python...
6
by: cs | last post by:
I noticed there is some .net services on my winxp. One or two mention the CLR. Does that mean that my .net apps/services wont run before those services start? I need to run my service as early on...
0
by: Diego F. | last post by:
I've been days with that. I'm trying to work with web services sending and returning objects, and the web service must store some objects. - My first try (the most obvious in my opinion) was to use...
26
by: Mr Newbie | last post by:
What do I need to run a web service on my PC ? I know I need the .NET Framework, but do I need IIS Running ?
3
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
7
by: Stu | last post by:
Hi, I have a web service which returns a record set and works well integrated with an asp dot net page. However if I decided to develop a unix app will i be able to read the dataset as it is...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
2
by: sdstraub | last post by:
I have created 5 services in my project, in the 1st service I set servicestorun = array of all 5 services, I have a project installer with 5 service installers, one for each service. I have code...
0
by: krishnaraju | last post by:
HI to all, please help me.its urgent requirement. my question is this is the wsdl file i got from our client.please see at bottom. when iam trying to access that webmethods iam getting...
1
by: Data Entry Outsourcing | last post by:
Data Entry plays vital role in every business area. Data Entry is one such aspects of any business that needs to be handled properly for expanding your business. Data Entry is one of the leading...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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: 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: 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...

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.