Re: Exposed Object vs Remoting server

From: Ken Kolda (ken.kolda_at_elliemae-nospamplease.com)
Date: 12/16/04


Date: Thu, 16 Dec 2004 11:27:22 -0800

Allow the server to access the same object which is remoted to the clients
is a frequently occurring problem in remoting. Luckily, the answer is pretty
simple. Currently, you've probably registered your remoting object using
RemotingConfiguration.RegisterWellKnownServerObject(). The problem is that
this method exposes the object anonymously, i.e. the server doesn't have a
reference to this instance.

To fix this, you do two things:

1) Declare and instantiate a named instance of your remote object.
2) Get rid of your call to RegisterWellKnownServerObject() and instead call
RemotingServices.Marshal() on your named object. This will expose the object
so it can accept client requests.

Hope that helps -
Ken

"news.microsoft.com" <xxx@xxx.com> wrote in message
news:O2uUvR54EHA.2572@tk2msftngp13.phx.gbl...
> Hello!
> I have a remoting server which exposes a Singleton object to a client.
> The client can call methods on the object without any problem.
>
> Now, I'm trying to let the client modify the exposed object.
> My question is: How would the server be able to load the exposed object
> an retrieve the value set by the client? I'm asking because there is no
> mention of the currently exposed instance of the class in the server code.
>
> Or how do I expose a named instance of an abject to my clients? (having
> a named instance would probably solve my problem)
>
> Thanks



Relevant Pages

  • Re: InProc/OutProce memory sharing
    ... I understand what you are trying to say that server does not need to poll ... anything because it exposes the api for the client to do housekeeping. ... So essentially the static properties do not retain the values when the ...
    (microsoft.public.dotnet.general)
  • Re: Cant see named instance
    ... Apply the latest supported MDAC for NT 4.0 and the ... you can create an alias on the client ... I support the Professional Association for SQL Server ... from that machine he can't see the named Instance on the Server ...
    (microsoft.public.sqlserver.server)
  • Exposed Object vs Remoting server
    ... I have a remoting server which exposes a Singleton object to a client. ... Or how do I expose a named instance of an abject to my clients? ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: MSDE access over network slow for XP workstations, not Win2K
    ... I'd suggest setting a fixed port for the named instance, ... Open svrnetcn.exe and for the named instance, ... On the client, run cliconfg.exe and set up an alias pointing to that port ... default instance installed on server SERVER1, ...
    (microsoft.public.sqlserver.msde)
  • Re: Address MSDE Server
    ... my question is how do i know the server address from a client? ... usually the server address is the name of the server hosting SQL ... the name can include the instance name if dealing with a named instance, ...
    (microsoft.public.sqlserver.msde)