473,769 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Communication between a Windows Service and a UI Front End

JB
Hi All,

I have a VB.NET application that constantly executes queries through
ODBC connections. The application consists of a simple Form type UI
where the query parameters can be edited, and a simple scheduler that
executes the queries.
The application works fine as "standalone " but it now needs to be
installed on a server and left running permanently even when no user
is logged on.
I think a Windows Service would be perfect for this, but I read
everywhere that Windows Services shouldn't have a UI. That makes sense
to me and I'd have no problem splitting the application between a
Front End (form based to edit the parameters) and a back end (doing
the actual execution of the queries).
What I'm wondering now is what would be the simplest way to achieve
this? I've been looking into .NET Remoting (MSDN examples and various
groups), but it seems far too complex for what I need. I need the
split applications to behave just like one single application, they
will always be on the same machine (even same directory), etc.
Can anybody give me any direction on that and/or point me to examples
of Windows Service / UI communication.

Thanks a lot
JB

Aug 26 '07 #1
9 3723
JB wrote:
.... What I'm wondering now is what would be the simplest way to achieve
this?
Can anybody give me any direction on that and/or point me to examples
of Windows Service / UI communication.

Thanks a lot
JB
I have a Service that sits on various Servers. My Service only requires
to function once every 30 mins. Before it performs its task, it checks
a configuration file ("ini" file) which is stored on the local machine.

The ini file can be modified by a separate program which a User launches
when they're logged-in.

This might not suit your requirements, but it might give you an idea of
a way to address your problem.

Regards,

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Aug 26 '07 #2
You could store the values in a database and thus comunicate through the
database with your service ( periodic check intervall ) or
with sql 2005 you could use notification services ( so the service wakes up
when a task is added to the db ) .

And yes Remoting would be suitable , and is not as difficult / complex as
you might think

regards

Michel

"ShaneO" <sp****@optusne t.com.auschreef in bericht
news:46******** *************** @news.optusnet. com.au...
JB wrote:
>.... What I'm wondering now is what would be the simplest way to achieve
this?
Can anybody give me any direction on that and/or point me to examples
of Windows Service / UI communication.

Thanks a lot
JB
I have a Service that sits on various Servers. My Service only requires
to function once every 30 mins. Before it performs its task, it checks a
configuration file ("ini" file) which is stored on the local machine.

The ini file can be modified by a separate program which a User launches
when they're logged-in.

This might not suit your requirements, but it might give you an idea of a
way to address your problem.

Regards,

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.

Aug 27 '07 #3
JB
On 27 Aug, 07:28, "Michel Posseth [MCP]" <M...@posseth.c omwrote:
You could store the values in a database and thus comunicate through the
database with your service ( periodic check intervall ) or
with sql 2005 you could use notification services ( so the service wakes up
when a task is added to the db ) .

And yes Remoting would be suitable , and is not as difficult / complex as
you might think

regards

Michel

"ShaneO" <spc...@optusne t.com.auschreef in berichtnews:46* *************** *******@news.op tusnet.com.au.. .
JB wrote:
.... What I'm wondering now is what would be the simplest way to achieve
this?
Can anybody give me any direction on that and/or point me to examples
of Windows Service / UI communication.
Thanks a lot
JB
I have a Service that sits on various Servers. My Service only requires
to function once every 30 mins. Before it performs its task, it checks a
configuration file ("ini" file) which is stored on the local machine.
The ini file can be modified by a separate program which a User launches
when they're logged-in.
This might not suit your requirements, but it might give you an idea of a
way to address your problem.
Regards,
ShaneO
There are 10 kinds of people - Those who understand Binary and those who
don't.
Hi All,

Thanks for your suggestions, it helped. I think I will go for an
hybrid solution.
Save an Xml file picked up by the service, and for a UI refresh,
implement a few Remoting function to interogate the service on its
current state.

Regards
JB

Aug 27 '07 #4
ShaneO <sp****@optusne t.com.auwrote in news:46d1f50f$0 $11059$afc38c87
@news.optusnet. com.au:
I have a Service that sits on various Servers. My Service only requires
to function once every 30 mins. Before it performs its task, it checks
a configuration file ("ini" file) which is stored on the local machine.

The ini file can be modified by a separate program which a User launches
when they're logged-in.
Wow, yuck - you should really be using remoting!
Aug 27 '07 #5
JB <jb*********@gm ail.comwrote in news:1188219529 .543145.104720
@r34g2000hsd.go oglegroups.com:
Thanks for your suggestions, it helped. I think I will go for an
hybrid solution.
Save an Xml file picked up by the service, and for a UI refresh,
implement a few Remoting function to interogate the service on its
current state.
Why not implement the UI functions as a remoting function too? That'll save
you the hassle of writing out to disk + allow network users to access the
service too!
Aug 27 '07 #6
JB
On 27 Aug, 16:24, Spam Catcher <spamhoney...@r ogers.comwrote:
JB <jb.bross...@gm ail.comwrote in news:1188219529 .543145.104720
@r34g2000hsd.go oglegroups.com:
Thanks for your suggestions, it helped. I think I will go for an
hybrid solution.
Save an Xml file picked up by the service, and for a UI refresh,
implement a few Remoting function to interogate the service on its
current state.

Why not implement the UI functions as a remoting function too? That'll save
you the hassle of writing out to disk + allow network users to access the
service too!
Hi Spam Catcher,

You're right, it would certainly be more "elegant" to use remoting for
the whole thing, but the truth is, I'm worried it would require too
much of rewriting to implement. And as I couldn't find any good sample
code out there (other than the basic MSDN one) I'd rather go for
something simpler that I can maybe improve in the future.

Regards
JB

Aug 27 '07 #7
Spam Catcher wrote:
>
Wow, yuck - you should really be using remoting!
I certainly wouldn't agree with using remoting. In this case the
settings are usually only configured during installation and never need
to be changed, however if they ever did, I would argue that using the
method I am using follows the KISS principle and doesn't use
high-falutin' solutions just for the heck of it.

It's funny, Remoting wasn't being used by anyone only a short while ago,
and now every man and his dog seems to be jumping onto the bandwagon!
(I guess that's how fads are created)
ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Aug 27 '07 #8
ShaneO <sp****@optusne t.com.auwrote in news:46d3377c$0 $15276$afc38c87
@news.optusnet. com.au:
I certainly wouldn't agree with using remoting. In this case the
settings are usually only configured during installation and never
need
to be changed, however if they ever did, I would argue that using the
method I am using follows the KISS principle and doesn't use
high-falutin' solutions just for the heck of it.
I guess I over-reacted a bit, your method is definately KISS!

I've seen some apps use the registry to pass information back and forth.

.NET's service controller class also has the ability to execute a
custom command and pass in parameter
It's funny, Remoting wasn't being used by anyone only a short while
ago,
and now every man and his dog seems to be jumping onto the bandwagon!
(I guess that's how fads are created)
Remoting has been around since .NET 1.0, which is >5 years old. These
days applications need to be run remotely or on several PCs at once
which mean that some sort of network interface needs to be implemented.
As such .NET remoting is typically the easiest and most robust method
available.

I tend to stay away from data integration methods (i.e. using an INI,
Database, etc) because users could modify the INI file and fudge data. I
always liked the ideas of separate tiers rather than tieing everything
together through a common data layer.

Just my preference I guess :-)

Aug 27 '07 #9
ShaneO wrote:
It's funny, Remoting wasn't being used by anyone only a short while ago,
and now every man and his dog seems to be jumping onto the bandwagon!
I suspect that's largely because we're all having to turn out Windows
Services to get 'round Vista's security .. er .. "enhancemen ts" and
there's no other, easy way of adding a client-process callable API to a
..Net-written Windows Service ...
"he said, earnestly hoping that /someone/ would disagree and suggest
something far, far better" ;-)

Regards,
Phill W.
Aug 28 '07 #10

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

Similar topics

2
1499
by: orion30 | last post by:
All is in the Object. Is-it possible to modify a window from an another window without having a link Parent To Child ? Thank you
4
9326
by: Christian Westerlund | last post by:
Hi! Does anyone know if it is possible for a client server communication easy in .NET with these requirements: The client always initiates the communication The server only answers (responds) Uses port 80, skips firewall The server computer doesn't have a IIS or web server
3
5726
by: Chuck Bowling | last post by:
Ok, I'm not sure this is a C# question but here goes anyhow... I used this walkthru to create a windows service: ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vbcon/html/vbwlkwalkthroughcreatingwindowsserviceapplication.htm It appears to install ok but when I try to start it I get this message in a JIT Debugging window: "JIT Debugging failed with the following error: Access is denied.
4
9024
by: Kris | last post by:
I have a Windows Service in C# talking to a serial port and using Remoting. It also uses several COM objects. On customer's computer the service will occassionally hang somewhere - the service still shows on a Task Manager list. In Services it says it is still running. However there is no way to stop it other than by rebooting the whole computer. No exception (including non-CLS) is ever generated. I added a separate System.Timers.Timer...
5
8475
by: Brian Patrick | last post by:
I have an application model which will consist of a front-end configuration application, which needs to control the state of a back-end vb.net windows service (which is the component that does all the work). Think of this in the same manner as say microsoft management console and the w3svc (inetinfo) service. What should the standard communication protocol be between the configuration app and the service in this model? For example,...
1
2238
by: SL33PY | last post by:
I have a windows service that runs as a system service (so noone has to be logged in for the service to work). A part of the service contains code to export the results in a file. This is where the problem is. The same code should also work on a client (front-end), but that is another (already solved) issue. At first I was thinking of having the results written to a local path, but the my client wants it at a share at one of their file...
8
1820
by: Mike C# | last post by:
Anyone know of any good articles on how to write a windows service in native (unmanaged) VC++? Also, how to use IPC in the service to communicate with a front-end GUI application would be helpful... Thanks!
4
1384
by: ags5406 | last post by:
Hi All I have a task that I'm thinking about attacking in two different ways but don't know enough about Windows Services. First: We have a server application written in VB.net that acts as a middleman between various Fortan DLL's (the calculation engines) and various front end client applications (one in Java and two in
9
2343
by: dm3281 | last post by:
Hello -- I plan on writing a C# service using VS2005. If I want my service to have a tray icon, is this typically done from within my service or do/should I create a controller application and have that run separately from my service?
0
9579
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
10038
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...
0
8867
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
7404
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
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5294
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
3952
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
2
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2812
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.