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

Confused with services

Hi all,

I'm am I bit of a newb when it comes to services. I need someone to explain
in English how to go about this with no experience in programming services.
Basically I need to make a simple app which monitors the event log and sends
email. That part is fine.

My problem is, I need this program to run when people are not logged in as
it's going to be on a server. So I guess I need a service correct? Now the
problem I have with that is that I need people to be able to configure it.
So I was thinking of putting it in the system tray, no problem. But
apparently you cannot make a service popup a dialog window correct?

How then can I write a service with dialog boxes to configure settings and
what not? Or is there a better way to approach this problem?

Thanks in advance.

Jun 27 '08 #1
4 1074
Yes, you would want a service.
Generally speaking, configuration values are stored in the app.config xml
file, which gets deposited next to the built
service executable as <yourservicename>.exe.config. The service reads this
file when it starts.
You could either write a second app which would load this file and allow
users to edit it and save it, or you could expose a WCF service host in your
service which would allow remote clients to connect and configure it. In
either case, the service would need to be stopped and restarted to read the
new configuration settings.
Peter
"infused" <in*****@infused.comwrote in message
news:58**********************************@microsof t.com...
Hi all,

I'm am I bit of a newb when it comes to services. I need someone to
explain in English how to go about this with no experience in programming
services. Basically I need to make a simple app which monitors the event
log and sends email. That part is fine.

My problem is, I need this program to run when people are not logged in as
it's going to be on a server. So I guess I need a service correct? Now the
problem I have with that is that I need people to be able to configure it.
So I was thinking of putting it in the system tray, no problem. But
apparently you cannot make a service popup a dialog window correct?

How then can I write a service with dialog boxes to configure settings and
what not? Or is there a better way to approach this problem?

Thanks in advance.
Jun 27 '08 #2
On May 3, 6:39*am, "infused" <infu...@infused.comwrote:
Hi all,

I'm am I bit of a newb when it comes to services. I need someone to explain
in English how to go about this with no experience in programming services..
Basically I need to make a simple app which monitors the event log and sends
email. That part is fine.

My problem is, I need this program to run when people are not logged in as
it's going to be on a server. So I guess I need a service correct? Now the
problem I have with that is that I need people to be able to configure it.
So I was thinking of putting it in the system tray, no problem. But
apparently you cannot make a service popup a dialog window correct?

How then can I write a service with dialog boxes to configure settings and
what not? Or is there a better way to approach this problem?

Thanks in advance.
As per my understanding we can have a windows service running in the
background - for dialog boxes we would have to call APIs from Win32
user32.dll as there is no form elements in windows service(i think
so..please correct me if am wrong on this point). Here's a link which
explains calling user32 MessageBox function.
http://msdn.microsoft.com/en-us/libr...in32error.aspx

To configure a service we need to write a client application - like
SQL Server is a service but we can configure the options using
Management Studio/Enterprise manager.
Jun 27 '08 #3
Thanks for the replies.
"infused" <in*****@infused.comwrote in message
news:58**********************************@microsof t.com...
Hi all,

I'm am I bit of a newb when it comes to services. I need someone to
explain in English how to go about this with no experience in programming
services. Basically I need to make a simple app which monitors the event
log and sends email. That part is fine.

My problem is, I need this program to run when people are not logged in as
it's going to be on a server. So I guess I need a service correct? Now the
problem I have with that is that I need people to be able to configure it.
So I was thinking of putting it in the system tray, no problem. But
apparently you cannot make a service popup a dialog window correct?

How then can I write a service with dialog boxes to configure settings and
what not? Or is there a better way to approach this problem?

Thanks in advance.
Jun 27 '08 #4

"infused" <in*****@infused.comwrote in message
news:97**********************************@microsof t.com...
Thanks for the replies.
"infused" <in*****@infused.comwrote in message
news:58**********************************@microsof t.com...
>Hi all,

I'm am I bit of a newb when it comes to services. I need someone to
explain in English how to go about this with no experience in programming
services. Basically I need to make a simple app which monitors the event
log and sends email. That part is fine.

My problem is, I need this program to run when people are not logged in
as it's going to be on a server. So I guess I need a service correct? Now
the problem I have with that is that I need people to be able to
configure it. So I was thinking of putting it in the system tray, no
problem. But apparently you cannot make a service popup a dialog window
correct?

How then can I write a service with dialog boxes to configure settings
and what not? Or is there a better way to approach this problem?

Thanks in advance.
You can implement file change notification in your service that way you
would not have to re-start your service when the config file changes.
Or if you implement WCF you communicate with the service and have the
service update the config file that way the service would be aware of the
changes and it would not have to be restarted.
Jun 27 '08 #5

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

Similar topics

8
by: Chris | last post by:
Hi, I was just asigned a project and was doing some research and am now confused with Enterprise Service, Remoting and Web Services. Now I am not sure which will be benificial to my project. I...
2
by: ianLOSEatTHEaltispartnersCAPS.com | last post by:
Hello, First and foremost appols for what must be the n-billionth "new programmer" post you've had but if someone could see their way clear to helping me, or just recomending some reading I...
5
by: Claire | last post by:
I'm testing my first service and I'm receiving the above exception whenever I attempt to open some files for writing. Reading is fine. The files are on the same directory as my service application...
12
by: Blaze | last post by:
I am doing the first walk through on the Visual Studio .Net walkthrough book to learn a little about programming. I am having issues with the first tutorial not running correctly. It seems that...
4
by: Amy Snyder | last post by:
I am trying to discern the difference between creating a web service or using IIS Virtual Directory Management for SQL Server Utitly if I want to provide xml data from a database. I have created...
36
by: MLH | last post by:
Does Date = Date + 1 mean Date Statement equals Date Function plus 1? And if the answer is Yes, how much actual time is being added to the date function in this assignment?
2
by: postings | last post by:
Hi I was under the mistaken impression that Application variables could be shared by websites running under the same IIS process. Looking at the documentation this isn't true. So what is the...
3
by: itfetish | last post by:
I've been programming a bit in PHP and then recently learnt classic ASP for projects at work, now I'm working on another project that they want done in .net. I've got my head around web parts, that...
0
by: Ross Culver | last post by:
I've gone round and round on this same issue for weeks unable to find any solution referenced on the Internet or in any forum. I've changed the session management from InProc to SQLServer to...
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:
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
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...
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
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...
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
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...
0
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...
0
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,...

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.