lalabear

hi

this code:

// Register channel

HttpChannel channel = new HttpChannel(8080);

ChannelServices.RegisterChannel(channel, false);

// Register MyRemoteObject

RemotingConfiguration.RegisterWellKnownServiceType(

typeof(MyRemoteType),

"MyRemoteObject",

WellKnownObjectMode.Singleton);

i realise that it only waits for the client's to create the remotable object isit possible to let it create the object after these codes instead of letting the client create



Re: .NET Remoting and Runtime Serialization how to let Singleton in remoting create the object first?

ibrahimkurt

take a look to the server activated term



Re: .NET Remoting and Runtime Serialization how to let Singleton in remoting create the object first?

A Wilco

I don't know really how to do it with .NET remoting (AFAIK it should just be

Code Snippet

MyRemoteType remote = new MyRemoteType();

and then the CLR will take care of it, but that doesn't seem to work very well.

Have a look at WCF ( http://www.nexfx3.com ), it uses ServiceHost which has a .Instance property, tho I haven't actually got around to trying it myself yet Smile






Re: .NET Remoting and Runtime Serialization how to let Singleton in remoting create the object first?

John Lambert - MSFT

You could have the server connect to it just like a client would.