Ian,

        Yes, both A can ping B and B can ping A.

        I posted this issue on another news group and got an answer that so
far seems to solve the problem.  

"If you pass the MBR as an input param from the client, I think you have to
set
typeLevelFilter = Full.
Also, your server should know MBR types, if they are declared at client."

This is done by:
"IDictionary p = new Hashtable();
p["typeFilterLevel"] = "Full";
_chnl = new TcpServerChannel(props, new BinaryServerFormatterSinkProvider(p,
null));

If you pass MBR out from client to server you should open TcpServerChannel (
or HttpServerChannel) on client as well.

The same settings for type filtering should be on server.

Actually, it doesn't matter how you configure channels. ALL settings could
be set through a config file and programatically as well."

Thanks to Sergey Ivasenko on Developersdex.com for this answer.

Thanks also to everyone here that offered suggestions!  Newsgroups are a
developer's best friend!

Rebecca


-----Original Message-----
From: Griffiths, Ian [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 10:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] repost:Passing a MarshalByRefObject as an
i nput parameter causes error -


Lohr, Rebecca wrote:
> I'm far from a network expert, but if networking were the
> problem, shouldn't all calls to the component fail, rather
> than only the calls that pass MBRO as input parameters?

Actually this is exactly what can happen.

This happens for the same reason that in many network configurations,
you are able to use a web browser running on your client machine to
connect to machines out on the internet, but machines on the internet
are unable to connect back to you.

Firewalls are designed to make this kind of scenario happen - it is very
common for firewalls to allow new connections to be opened in an
outbound direction but not an inbound direction.

This matters in a remoting context.  If you pass a MBRO in to a remote
component, the remote server will attempt to connect back to the object
on the client machine.  This means that the server will open a new
connection to the client.  (It doesn't attempt to piggy-back on the
existing connection.)

So even though you have successful communication between the client and
the server when the client is invoking methods on the server, you have a
problem as soon as you pass an MBRO object.  By doing this you
essentially reversing roles - the client now becomes a server (it is
making its MBRO object accessible remotely) and the server now becomes a
client (it is attempting to get a remote reference to the MBRO object).


However, it's not the only reason things can go wrong...

> As far as I know, there is no firewall between the two machines.
> They are on different domains.  The two machines can "see" each
> other - ping, mounted network drives, etc.

Can machine A ping B *AND* machine B can also ping machine A?  (When
trying to rule out firewall problems, you need to test things from both
sides of the firewall - firewalls are deliberately asymmetrical.)


-- 
Ian Griffiths
DevelopMentor

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to