cui chun
cui chun

Reputation: 107

Why .NET remoting events from server cannot reach clients on different computers

In my case, the server will notify the client to fetch his data when the data is ready. This notification is implemented via an event which the client has to subscribe.

When tested in the same computer, the client get notified without any problems. However, when client is moved to the other computer, it cannot get the notifications any more.

I checked the network connection and the availability of remoting service, and found the client can access the remoting object marshalled on the server end, event subscription was fine without any exceptions.

But what confused me is that actually the server's event == null, means client's method never registered here.

Does anybody know the cause? Thanks BR

Upvotes: 1

Views: 1633

Answers (3)

clemahieu
clemahieu

Reputation: 1429

If remoting calls are going both directions, ports need to be openable in both directions meaning your server needs to be capable of opening a port on your clients. You'll have two sockets open, bi direction communication.

Upvotes: 0

Bogdan_Ch
Bogdan_Ch

Reputation: 3336

Each client object that register to server event should be MarshalByRefObject and its assembly should be referenced by the server. So you need wrappers around events if you want to use them in remoting

Perhaps, this article may help you.

http://aviadezra.blogspot.com/2008/06/code-snippets-remoting-client-server_19.html

Upvotes: 2

John Saunders
John Saunders

Reputation: 161783

First of all, I'd look in the event logs on both the client and the server to see if there are errors related to this.

Second, is it the same user identity with the remote client and with the local client? Same logged in user with the same domain account?

What about firewall setup? Are you sure that Remoting is allowed in?

Finally, just to make sure: are you aware that Remoting is now deprecated in favor of WCF?

Upvotes: 1

Related Questions