473,242 Members | 1,488 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,242 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 1067
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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.