Re: remoting

From: Dmitriy Lapshin [C# / .NET MVP] (x-code_at_no-spam-please.hotpop.com)
Date: 04/21/04


Date: Wed, 21 Apr 2004 11:08:11 +0300

Good question. I am not a remoting guru but I will do my best. What actually
happens in the example is checking the type of the proxy provided by the
system for the remotable object. The proxy pretends to look as the real
object to the caller, but it does all the routine work like marshalling and
communicating over the remoting channel behind the scenes.

To quote the MSDN:

----------------------------------------------------------------------------
------
A client that uses an object across any kind of a remoting boundary is
actually using a transparent proxy for the object. The transparent proxy
gives the impression that the actual object resides in the client's space.
It achieves this by forwarding calls made on it to the real object using the
remoting infrastructure.
The transparent proxy is itself housed by an instance of a managed runtime
class of type RealProxy. The RealProxy implements a part of the
functionality needed to forward the operations from the transparent proxy. A
proxy object inherits the associated semantics of managed objects such as
garbage collection, support for fields and methods, and can be extended to
form new classes. Thus the proxy has a dual nature; on the one hand it needs
to act as an object of the same class as the remote object (transparent
proxy), and on the other it is a managed object itself.

----------------------------------------------------------------------------
------

So what is probably checked is whether there is a RealProxy for the
Object1 - and if not, remoting hasn't been configured properly.

-- 
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"frazer" <ichor@hotmail.com> wrote in message
news:O%23EYuA1JEHA.2624@TK2MSFTNGP09.phx.gbl...
> i am checking a remoting sample and cant understand what this means.
> what does this mean?
>
>
> if(!System.Runtime.Remoting.RemotingServices.IsTransparentProxy(Object1))
> {
>  throw new ApplicationException("Configure remoting first");
> }
>
>


Relevant Pages

  • Re: remoting
    ... I am not a remoting guru but I will do my best. ... The proxy pretends to look as the real ... actually using a transparent proxy for the object. ... The RealProxy implements a part of the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: remoting
    ... I am not a remoting guru but I will do my best. ... > happens in the example is checking the type of the proxy provided by the ... > actually using a transparent proxy for the object. ... > to act as an object of the same class as the remote object (transparent ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: remoting
    ... I am not a remoting guru but I will do my best. ... > happens in the example is checking the type of the proxy provided by the ... > actually using a transparent proxy for the object. ... > to act as an object of the same class as the remote object (transparent ...
    (microsoft.public.dotnet.security)
  • Re: .NET remoting and IE proxy exceptions
    ... I believe that the .NET remoting ... creating the HTTP connection to the server. ... > computers in LAN are set to use proxy for http. ... that clients do use proxy ...
    (microsoft.public.dotnet.framework.remoting)
  • .Net Remoting Anzahl Clients begrenzen
    ... ich habe eine Frage bezüglich .Net Remoting. ... Ich möchte jetzt die Anzahl der erzeugten Objekte begrenzen. ... Wie kann ich dann aber kontrollieren, ... Proxy erstellen und benutzen kann. ...
    (microsoft.public.de.german.entwickler.dotnet.framework)

Quantcast