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

Windows Service, Sharing Data

Hey all....

I'm writing an app that needs to send/recieve data from other applications
running, I guess you could think of it as a data relay broker between running
applications. I had planned on creating a windows service to handle this,
but I found out that I cannot directly send/recieve data here, i can only
signal it. First off, am I wrong in this assumption? Secondly, I have also
noticed some people talking about creating a remoting application to handle
this task (which is controlled by the windows service I would assume). Does
anyone know of some examples here or some good references so I could brush up
on my remoting?? If I create a .NET remoting app which would act as the
broker, does the user need IIS installed?

Thanks in advance, Jason
Nov 22 '05 #1
2 1540
Hey Jason,

I won't claim to be an expert on remoting but have been recently learning a
lot about it...

Remoting doesn't require IIS on either side, but may be simpler to use it if
you're wanting the security features rolled for you. What I've been finding
is that the more difficult side of remoting is determining when to use which
function/option than it taking hundreds of lines of code to set up.

The only resource I've been using is a test-prep book. The following
probably won't be enough to code everything, but as an idea of how much (or
little) is involved, basically, you register the server with something like:

TcpServerChannel channel = new TcpServerChannel(1234);

ChannelServices.RegisterChannel(channel);

RemotingConfiguration.RegisterWellKnownServiceType (

typeof(MyProject.MyClass),"MyClass",

WellKnownObjectMode.SingleCall);

This defines the protocal and port on which the service is going to listen
for requests. On the client side, you add project references to the server
assembly, then do something like the following to create an instance of the
service (or more accurately a proxy to it):

TcpClientChannel channel = new TcpClientChannel();

ChannelServices.RegisterChannel(channel);

RemotingConfiguration.RegisterWellKnownClientType(

typeof(DbConnect), "tcp://j2k:1234/MyClass");

MyClass ServerOjbect = new MyClass();

Now you can work with the ServerObject as any other.

Overall, it seems to involve as much or more work getting the references and
"usings" in place than the amount of coding to make your objects remotable!

I hope that's at least a start...

John

"Jason Schneekloth" <Ja**************@discussions.microsoft.com> wrote in
message news:E8**********************************@microsof t.com...
Hey all....

I'm writing an app that needs to send/recieve data from other applications
running, I guess you could think of it as a data relay broker between running applications. I had planned on creating a windows service to handle this,
but I found out that I cannot directly send/recieve data here, i can only
signal it. First off, am I wrong in this assumption? Secondly, I have also noticed some people talking about creating a remoting application to handle this task (which is controlled by the windows service I would assume). Does anyone know of some examples here or some good references so I could brush up on my remoting?? If I create a .NET remoting app which would act as the
broker, does the user need IIS installed?

Thanks in advance, Jason

Nov 22 '05 #2
For Remoting, my advice is to read Ingorammer's book. He has a website
ingorammer.com. You do not need to use IIS if you do not want to.

As for the Service, you can write a listener which listens for the data and
then send the data some other location. But if you want to interact with
another app, Remoting might be the way to go.

"Jason Schneekloth" wrote:
Hey all....

I'm writing an app that needs to send/recieve data from other applications
running, I guess you could think of it as a data relay broker between running
applications. I had planned on creating a windows service to handle this,
but I found out that I cannot directly send/recieve data here, i can only
signal it. First off, am I wrong in this assumption? Secondly, I have also
noticed some people talking about creating a remoting application to handle
this task (which is controlled by the windows service I would assume). Does
anyone know of some examples here or some good references so I could brush up
on my remoting?? If I create a .NET remoting app which would act as the
broker, does the user need IIS installed?

Thanks in advance, Jason

Nov 22 '05 #3

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

Similar topics

3
by: DH | last post by:
I hope this is a right place to post my question I'm working on a Windows service application with VB.net. The purpose is to let the service application as a monitor to periodically check a...
2
by: Jason Schneekloth | last post by:
Hey all.... I'm writing an app that needs to send/recieve data from other applications running, I guess you could think of it as a data relay broker between running applications. I had planned...
2
by: Mark | last post by:
I created an extremely simple windows service that only writes to the EventLogs on Stop and Pause. I installed it using the InstallUtil.exe program, the output of which is below. It appears to be...
4
by: Lenard Gunda | last post by:
Hello! I have created a program, that receives files, and then stores them locally for later access. This program is run on a Windows 2000 Server computer as a system service. Some of the files...
5
by: z. f. | last post by:
Hi, I'm working on a web project and i create classes to do business logic and connect to DB. i also need a windows application to do the same functionality as defined in classes inside the...
0
by: Scanner2001 | last post by:
I have a web service, which in turn uses a dll that is installed on the same server. The dll is deployed to the GAC. One of the purposes of the dll is to create a file, then write some information...
6
by: Eric Guthmann | last post by:
Hello all We have an SOA application that includes an ASP.NET webservice and WinForms client. My question is regarding the use of Add Web Reference in Visual Studio. The tool is nice because...
4
by: WinDev | last post by:
We are trying to build a system where we have a Windows Service do some manipulation of data, and then sending the data to a Windows App. I had posted a question of how we should do this and was...
0
by: Univar | last post by:
I apologize now if the answer is somewhere else on this site but I was unable to find an adequate explanation. I have recently decided to create a Windows Service to act as a client for a processor...
6
by: Chris Marsh | last post by:
All I have a database table, changes to the data within which I am interested in acting on. The approach that I'm taking is to have the database update a file every time data is updated. This...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
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
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,...
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
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...
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
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...

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.