Hello. I have a windows service running that listens to a port and makes
insert queries in a database.
I need to make an interface, so my idea is creating a simple windows
application that just shows messages from the service.
Can I do that with remoting? What are the main steps to do that?
--
Regards,
Diego F. 7 2260
One way i can recommend is while the windows service is processing, let it
write onto event viewer. So that you can use the windows app to read the
messages from Event viewer on a perioding intervels.
HTH
--
Every thing is perfect, as long as you share!!!
Don''t forget to rate the post
"Diego F." wrote:
Hello. I have a windows service running that listens to a port and makes
insert queries in a database.
I need to make an interface, so my idea is creating a simple windows
application that just shows messages from the service.
Can I do that with remoting? What are the main steps to do that?
--
Regards,
Diego F.
If you already have it listenting to one port, why not just have it listen
to another on a different thread and have your interface communicate with it
through sockets.
Regards
John Timney (MVP) http://www.johntimney.com http://www.johntimney.com/blog
"Diego F." <di********@msn.comwrote in message
news:eQ**************@TK2MSFTNGP04.phx.gbl...
Hello. I have a windows service running that listens to a port and makes
insert queries in a database.
I need to make an interface, so my idea is creating a simple windows
application that just shows messages from the service.
Can I do that with remoting? What are the main steps to do that?
--
Regards,
Diego F.
"Diego F." <di********@msn.comwrote in message
news:eQ**************@TK2MSFTNGP04.phx.gbl...
Hello. I have a windows service running that listens to a port and makes
insert queries in a database.
I need to make an interface, so my idea is creating a simple windows
application that just shows messages from the service.
Can I do that with remoting? What are the main steps to do that?
Sure you can, and you can also use WCF (V3 of the Framework).
When using local cross-process remoting, your best bet is to use the
"IpcServerChannel".
Implement the "server side" in your Windows application and make sure it
runs on a thread separated from the UI thread, keep in mind to marshal the
calls when updating the UI. Your Service simply acts as a remoting client.
Search MSDN, it sure contains some simple samples to give you an head start.
Willy.
"Chakravarthy" <ds******@india.comwrote in message
news:8A**********************************@microsof t.com...
One way i can recommend is while the windows service is processing, let it
write onto event viewer. So that you can use the windows app to read the
messages from Event viewer on a perioding intervels.
That looks easy. I can try that. Thank you for your idea. The only issue is
that won't be in real time.
--
Regards,
Diego F.
"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:66**********************************@microsof t.com...
"Diego F." <di********@msn.comwrote in message
news:eQ**************@TK2MSFTNGP04.phx.gbl...
>Hello. I have a windows service running that listens to a port and makes insert queries in a database.
I need to make an interface, so my idea is creating a simple windows application that just shows messages from the service.
Can I do that with remoting? What are the main steps to do that?
Sure you can, and you can also use WCF (V3 of the Framework).
When using local cross-process remoting, your best bet is to use the
"IpcServerChannel".
Implement the "server side" in your Windows application and make sure it
runs on a thread separated from the UI thread, keep in mind to marshal the
calls when updating the UI. Your Service simply acts as a remoting client.
Search MSDN, it sure contains some simple samples to give you an head
start.
Willy.
Then, just to identify the scenario, according to the MSDN help I need:
A remotable object.
A host application domain to listen for requests for that object.
A client application domain that makes requests for that object.
You suggest that the client is the service and the host is the windows app.
Which is the remotable object?
--
Regards,
Diego F.
"Diego F." <di********@msn.comwrote in message
news:uj*************@TK2MSFTNGP02.phx.gbl...
>
"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:66**********************************@microsof t.com...
>"Diego F." <di********@msn.comwrote in message news:eQ**************@TK2MSFTNGP04.phx.gbl...
>>Hello. I have a windows service running that listens to a port and makes insert queries in a database.
I need to make an interface, so my idea is creating a simple windows application that just shows messages from the service.
Can I do that with remoting? What are the main steps to do that?
Sure you can, and you can also use WCF (V3 of the Framework). When using local cross-process remoting, your best bet is to use the "IpcServerChannel". Implement the "server side" in your Windows application and make sure it runs on a thread separated from the UI thread, keep in mind to marshal the calls when updating the UI. Your Service simply acts as a remoting client. Search MSDN, it sure contains some simple samples to give you an head start.
Willy.
Then, just to identify the scenario, according to the MSDN help I need:
A remotable object.
A host application domain to listen for requests for that object.
A client application domain that makes requests for that object.
You suggest that the client is the service and the host is the windows
app.
Which is the remotable object?
--
Regards,
Diego F.
The "remotable object", is the object you want to pass from the client to
the server, for instance the service state information (what you called
"messages from the service") you want to pass from your service to the
Windows application. This object must derive from MarshalByRefObject and
implement a common interface.
Willy.
"Diego F." <di********@msn.comwrote in message
news:eQ**************@TK2MSFTNGP04.phx.gbl...
Hello. I have a windows service running that listens to a port and makes
insert queries in a database.
I need to make an interface, so my idea is creating a simple windows
application that just shows messages from the service.
Can I do that with remoting? What are the main steps to do that?
Why don't you look up how to do a Service OnCustomCommand event, which can
be done from a Windows Desktop application that's communicating with the
service?
The OnCustomCommand event gathers your messages from the service, which
could be held in an array, writes the data to a text file in a directory,
the Windows Desktop application, detects this file's presence and displays
the data in a Listbox. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dennis Stew |
last post by:
How do I access Public variables within a Windows Service?
I can, and have, created installed and executed a basic Service. From my
client App I can Start, Stop...etc the service.... What I want...
|
by: Fadi |
last post by:
Backround:
I am trying to figure out how to do the equivalant of a classic COM
Local Server Singleton in .NET/C#. I created a coupld of simple Class
Libs that exposes public interfaces and hosted...
|
by: Tappy Tibbons |
last post by:
We are trying to write a simple GUI front end to communicate with a service.
We need the GUI to make the service fire certain events if the user needs to
re-perform certain tasks manually, and...
|
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...
|
by: UJ |
last post by:
Is there any way for a windows service to start a windows program ? I have a
service that will need to restart a windows app if it needs to.
TIA - Jeff.
|
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...
|
by: deko |
last post by:
I'm trying to finalize a windows service design any would appreciate any
comments - I'm new to windows services.
Essentially my UI app relies on a service to schedule IO tasks. The service
does...
|
by: Jason |
last post by:
Ok, for the life of me, I just don't understand what's going on. I want to
use remoting to send messages from a windows service to a windows form app,
but I just can't get it to work. So, here's...
|
by: Peter |
last post by:
..NET 3.5
I have a Windows Service application and it does remoting,
but when a client incounters an error the client get the following error
message
"Server encountered an internal error....
|
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,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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
|
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...
|
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: 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,...
|
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,...
|
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...
| |