473,221 Members | 2,173 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,221 software developers and data experts.

Send Message to Windows Service

Hi!

I want to develop two applications one a Windows Service and the other a GUI
based application. I want some sort of communication between Service and
GUI. I have decided to use Remoting for this purpose.

For this I registered an object on Service side for Remoting purposes.
Remote Object exposes a function named ReloadFiles() that should internally
send a message to service class to Reload some files. Now I don't know how
to send message to that service class because Remote Object doesn't have a
reference to service.

Anybody there to give me a helping hand.
Thanks in advance.

Ahmad Jalil Qarshi
Jan 2 '06 #1
7 13935
"Ahmad Jalil Qarshi" <ah*********@SPAMhotmail.com> wrote in message
news:eu*************@TK2MSFTNGP09.phx.gbl...
Hi!

I want to develop two applications one a Windows Service and the other a
GUI based application. I want some sort of communication between Service
and GUI. I have decided to use Remoting for this purpose.

For this I registered an object on Service side for Remoting purposes.
Remote Object exposes a function named ReloadFiles() that should
internally send a message to service class to Reload some files. Now I
don't know how to send message to that service class because Remote Object
doesn't have a reference to service.

Anybody there to give me a helping hand.
Thanks in advance.

Ahmad Jalil Qarshi


They need to share some concept of type information to be able to pass the
message.

Make the remoted object implement and interface, and have that interface
declared in a separate DLL.

Now make the UI reference the DLL and it can use (assming the interface is
called IFoo)

IFoo f = (IFoo)RemotingServices.Connect(typeof(IFoo), myUrl);

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Jan 2 '06 #2
Hi,

This will work with remoting, but i think it is little uncouthly...

Did you thinked about Interprocess communication or shared memory or shared
events .. ?
See: http://www.habjansoftware.com/ipc_library.aspx

Regards,
Josip Habjan

"Ahmad Jalil Qarshi" <ah*********@SPAMhotmail.com> wrote in message
news:eu*************@TK2MSFTNGP09.phx.gbl...
Hi!

I want to develop two applications one a Windows Service and the other a
GUI based application. I want some sort of communication between Service
and GUI. I have decided to use Remoting for this purpose.

For this I registered an object on Service side for Remoting purposes.
Remote Object exposes a function named ReloadFiles() that should
internally send a message to service class to Reload some files. Now I
don't know how to send message to that service class because Remote Object
doesn't have a reference to service.

Anybody there to give me a helping hand.
Thanks in advance.

Ahmad Jalil Qarshi

Jan 2 '06 #3
"Josip Habjan" <jh*****@SPAM-OFF.net.hr> wrote in message
news:dp**********@ss405.t-com.hr...
Hi,

This will work with remoting, but i think it is little uncouthly...

Did you thinked about Interprocess communication or shared memory or
shared events .. ?
See: http://www.habjansoftware.com/ipc_library.aspx

Regards,
Josip Habjan

"Ahmad Jalil Qarshi" <ah*********@SPAMhotmail.com> wrote in message
news:eu*************@TK2MSFTNGP09.phx.gbl...
Hi!

I want to develop two applications one a Windows Service and the other a
GUI based application. I want some sort of communication between Service
and GUI. I have decided to use Remoting for this purpose.

For this I registered an object on Service side for Remoting purposes.
Remote Object exposes a function named ReloadFiles() that should
internally send a message to service class to Reload some files. Now I
don't know how to send message to that service class because Remote
Object doesn't have a reference to service.

Anybody there to give me a helping hand.
Thanks in advance.

Ahmad Jalil Qarshi



Of course the .NET 2.0 remoting IPC channel uses named pipes

Regards

Richard Blewett - Developmentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Jan 2 '06 #4
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:u9**************@tk2msftngp13.phx.gbl...

Of course the .NET 2.0 remoting IPC channel uses named pipes

Regards

Richard Blewett - Developmentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Yes, it is true, but in framework 1.1 you dont have IPC channels or named
pipes....

Regards,
Josip Habjan
Jan 2 '06 #5
"Josip Habjan" <jh*****@spamoff-net.hr> wrote in message
news:dp**********@magcargo.vodatel.hr...
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:u9**************@tk2msftngp13.phx.gbl...

Of course the .NET 2.0 remoting IPC channel uses named pipes

Regards

Richard Blewett - Developmentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Yes, it is true, but in framework 1.1 you dont have IPC channels or named
pipes....

Regards,
Josip Habjan


Agreed,

but I just thought it was worth pointing out that if he was using v2.0 there
was a solution built into the framework without him having to buy your
component

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Jan 3 '06 #6
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:eW**************@TK2MSFTNGP14.phx.gbl...

Agreed,

but I just thought it was worth pointing out that if he was using v2.0
there was a solution built into the framework without him having to buy
your component

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk


No problem :o)

Regards,
Josip Habjan
Jan 3 '06 #7
Thanks Josip & Richard

Since I have .NET 1.1 so I would like to use option provided by Richard
Blewett.

Thanks again.

Ahmad Jalil Qarshi

"Josip Habjan" <jh*****@SPAM-OFF.net.hr> wrote in message
news:dp**********@ss405.t-com.hr...
"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:eW**************@TK2MSFTNGP14.phx.gbl...

Agreed,

but I just thought it was worth pointing out that if he was using v2.0
there was a solution built into the framework without him having to buy
your component

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk


No problem :o)

Regards,
Josip Habjan

Jan 3 '06 #8

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

Similar topics

4
by: CK | last post by:
Hi all, I know this question is stupid. But i need some advice for this. I am trying to develop a website, which will allow the user send to order form to the admin email. I am planning to use the...
4
by: Kurien Baker Fenn | last post by:
How to send data from an ASP form to a visual basic form? Please help
2
by: robboll | last post by:
On a Windows 2000 Server in MYDomain I can do the following successfully: Net Send JoeUser "test" However on a Windows Server 2003 (Standard Edition) in MyDomain I get: An error occurred...
1
by: Paul | last post by:
I am using a windows service which accesses Microsoft Outlook. Outlook is supposed to send an email. This works fine when not run in a windows service. I am running the service under my user...
6
by: Usman | last post by:
Hi I have a window service written in C#. I have another application that requires a lengthy process to be performed like taking backup. How can I make this lengthy process be performed by...
1
by: mmassari | last post by:
Hi, I need to send a mail message from a web service. If i execute the code from a Windows Form Application the message is sended correctly but if i execute the same code from a web service an...
3
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a...
5
by: tommaso.gastaldi | last post by:
Hi. I have been implementing a simple email notification system using the handy class SmtpClient: With SmtpClient .Host =MailServer .Send(MailMessage) '... now my client is asking also for...
1
by: Vijay | last post by:
Hi, I have a problem to send Mail in ASP. I am using CDO for sending mail. My Server configuration are : Windows Server 2003 Stadndard Edition with R2, Service Pack 2, Microsoft Management...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
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...
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: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.