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

Windows Service or not

Hi All,

After trying the Windows Service sample from MSDN, I don't get what the
windows service class is better than a class handling and raising events
itself.
If using the System.ServiceProcess.ServiceBase, I can't get events in other
classes, but only in Event Log.

I'm trying to build a server class. Please advise me if I should use a
service class or not.

Thanks for any tips,
Anony

Nov 15 '05 #1
2 1325
Hi,

The protocol used in communication between the Service Control Manager and a
Windows Service is quite complex. Its implementation therefore is not that
simple and straightforward. The ServiceBase class already implements this
protocol as well as, I suppose, several other helper functions, enabling you
to concentrate on the functionality that will be valuable for service users.

It is also unclear to me how events in other classes and Event Log entries
are related in your post. These are two very different beasts. What you are
trying to accomplish?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Anony" <an***@newsgroup.ng> wrote in message
news:c0**********@news3.tilbu1.nb.home.nl...
Hi All,

After trying the Windows Service sample from MSDN, I don't get what the
windows service class is better than a class handling and raising events
itself.
If using the System.ServiceProcess.ServiceBase, I can't get events in other classes, but only in Event Log.

I'm trying to build a server class. Please advise me if I should use a
service class or not.

Thanks for any tips,
Anony


Nov 15 '05 #2
Thanks Dmitriy for the explanation.

I'm trying to biuild a class that raises lots events.
Other classes need the events to process something.

Someone gave me an idea to use the Windows Service. I found it not very
useful, but have doubt if I missed something.

Kind regard,
Anony

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:uq**************@TK2MSFTNGP11.phx.gbl...
Hi,

The protocol used in communication between the Service Control Manager and a Windows Service is quite complex. Its implementation therefore is not that
simple and straightforward. The ServiceBase class already implements this
protocol as well as, I suppose, several other helper functions, enabling you to concentrate on the functionality that will be valuable for service users.
It is also unclear to me how events in other classes and Event Log entries
are related in your post. These are two very different beasts. What you are trying to accomplish?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Anony" <an***@newsgroup.ng> wrote in message
news:c0**********@news3.tilbu1.nb.home.nl...
Hi All,

After trying the Windows Service sample from MSDN, I don't get what the
windows service class is better than a class handling and raising events
itself.
If using the System.ServiceProcess.ServiceBase, I can't get events in

other
classes, but only in Event Log.

I'm trying to build a server class. Please advise me if I should use a
service class or not.

Thanks for any tips,
Anony

Nov 15 '05 #3

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

Similar topics

11
by: Michael Riggio | last post by:
Is there a way to have a windows service instantiate a class that is a web service, which will then be accessible to clients via HTTP? Thanks, -Mike
1
by: Artur Kowalski | last post by:
I have a NotifyIcon in my Windows Service project and I am trying to add a ContextMenu to this NotifyIcon or use some of the mouse events. Everything isn't working. I think so base class of the...
9
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...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
3
by: Doug Bailey | last post by:
I am trying to control a Windows Service via a Web Service interface. (I am developing in .NET2003) I am using the ServiceController object which allows me to read the state of the services with...
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...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
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?...
1
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi, I created a web service that I want to host in windows service. The problem is that if I host it as windows service it does not use the configuration file. I have to define the binding,...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
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...

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.