473,324 Members | 2,581 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,324 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 1538
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: 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: 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...
1
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.