Re: Remote object with arguments?
- From: "Dave Sexton" <dave@jwa[remove.this]online.com>
- Date: Wed, 8 Nov 2006 16:07:28 -0500
Hi Mark,
Server-activated objects require a default constructor.
"Server Activation" (.NET Remoting)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconServerActivation.asp
If you must use a constructor on the client then you'll need a
client-activated object. Singleton, however, is not client-activated.
"Client Activation" (.NET Remoting)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconclientactivation.asp?frame=true
It's also possible to use dynamic publication by marshaling the object
yourself. This way you can use any constructor that you'd like when you
create the object on the server. The object becomes registered as a
Singleton, for all intensive purposes. Dynamic publication and the
application configuration file are mutually exclusive methods for registering
a Singleton. Dynamic publication is another form of server-activation:
"RemotingServices.Marshal"
http://msdn2.microsoft.com/en-us/library/b6fy37a8.aspx
--
Dave Sexton
<mkadlec99@xxxxxxxxx> wrote in message
news:1163014856.071731.257750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Got a remoting question I was hoping someone could solve. I have an
object (UpdateFlifo) that
has two constructors, one empty, and one with arguments. I want to
expose this
object remotely, which I have done in the code below and everything
works fine.
I now want to expose this object using constructor arguements, but not
sure
how to do this, do you have any idea?
RemotingConfiguration.RegisterWellKnownServiceType (
typeof(UpdateFlifo),
"UpdateFlifo",
WellKnownObjectMode.Singleton);
Mark.
.
- Follow-Ups:
- Re: Remote object with arguments?
- From: mkadlec
- Re: Remote object with arguments?
- From: mkadlec
- Re: Remote object with arguments?
- References:
- Remote object with arguments?
- From: mkadlec99
- Remote object with arguments?
- Prev by Date: Re: WebHandler
- Next by Date: Q: String (Capital S) vs string (small s)?
- Previous by thread: Remote object with arguments?
- Next by thread: Re: Remote object with arguments?
- Index(es):
Relevant Pages
|