Jakub Kúdela
Jakub Kúdela

Reputation: 35

.Net remoting sample won't run on my pc when connected to network

I am trying to understand .Net remoting with events and callbacks. While I was reading tutorials on internet I have found an article:

codeproject: .NET Remoting Events Explained

where this mechanism is explained on an example. I was playing with the project which I have downloaded on the very same webpage.

The only thing I've changed in code was an "RemotingEvents.Client.Form1.serverURI", which I have retyped to a localhost ("tcp://localhost:15000/serverExample.Rem"). I compiled the project in Visual Studio 2010 under .Net 4.0 and I've tested the compiled assemblies on Win7 64-bit PC and here I came across a problem.

I've run server and started it. After that I have connected one client on it, everything went fine beacause none callback was executed so far. The problem appeared when I was trying to send a message from mine client to server. The message went through to server and popped up in the text box as it was supposed to. Right after that the server was trying to callback the connected client but did not get through and popped an exception which returned to client, who was sending the message in the first place.

After the time spent by trying to run the application so that the callbacks would pass through as they were supposed to, I have found out that when I disconnect my PC from a public network that I am in, the server-client communication runs perfectly and without problems (even with more clients).

Does anybody know where is the problem why I cannot run these applications communicating properly with callbacks while been connected with mine PC to a mentioned network? Is there some sort of a conflict?

Thank You!

----- EDIT (03/11/2011 17:15) -----

After first answer from Chris Lively I was setting the firewall and I have found out that even with firewall swithed-off the problem still remains.

Upvotes: 0

Views: 425

Answers (1)

ChrisLively
ChrisLively

Reputation: 88074

The problem has to do with your firewall.

Connect back to the network then modify your PC's firewall settings for that network type to allow access to your PC along the appropriate port.

Basically, the server is trying to open a port on the client PC. The Client PC is denying it due to the default firewall settings.

If you need help with how to configure the firewall, please post a follow up question on http://serverfault.com

Upvotes: 1

Related Questions