Please help with two processing talking to each other!!!

U

UJ

I'm at my wits end. I have a service that downloads stuff from the web. When
it's done it needs to notify a windows app that there's new content for it
to display. Everybody seems to say to use remoting but I can't get it to
work. I can set up the remote object, I can call the object in the server
but I need to have notification sent to the server that something has
happened and I can't figure out how to do that in the remote object that I'm
calling.

Can somebody please help me? I'm getting desperate here.

Essentially I want to have the service make a call of some kind that will
tell the Windows App that there's new data to look at. I don't even need to
send the actual data (although that would be nice) - all I need is the
windows app to somehow get the notification that there is new data ready for
it.

TIA - Jeff.
 
N

Nicholas Paldino [.NET/C# MVP]

Jeff,

What you want to do is create an interface that the client will
implement. The object on the client must derive from MarshalByRefObject.
Then, when the client starts, pass an instance of the object to a method on
your service. The service will store the reference passed to it.

Because your client object derives from MarshalByRefObject, the server
will hold a proxy back to the client, and then any calls you make from the
server to the client will occur in the client's app domain.

Hope this helps.
 
U

UJ

Nicholas,
Could you direct me somewhere that explains how this is all done. I'm not
sure I understand how MarshalByRefObject works. And all of the examples I
have seen of remoting seem to be using the server to run code in it's own
context, not sending messages/data to a server and have it respond to it.

Thanks.

Jeff.

Nicholas Paldino said:
Jeff,

What you want to do is create an interface that the client will
implement. The object on the client must derive from MarshalByRefObject.
Then, when the client starts, pass an instance of the object to a method
on your service. The service will store the reference passed to it.

Because your client object derives from MarshalByRefObject, the server
will hold a proxy back to the client, and then any calls you make from the
server to the client will occur in the client's app domain.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

UJ said:
I'm at my wits end. I have a service that downloads stuff from the web.
When it's done it needs to notify a windows app that there's new content
for it to display. Everybody seems to say to use remoting but I can't get
it to work. I can set up the remote object, I can call the object in the
server but I need to have notification sent to the server that something
has happened and I can't figure out how to do that in the remote object
that I'm calling.

Can somebody please help me? I'm getting desperate here.

Essentially I want to have the service make a call of some kind that will
tell the Windows App that there's new data to look at. I don't even need
to send the actual data (although that would be nice) - all I need is the
windows app to somehow get the notification that there is new data ready
for it.

TIA - Jeff.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top