Working with singletons in .Net Remoting?

Then, in your server, Use RemotingServices. Marshal(singletonInstance, MesgURI) Instead of RegisterWellKnownServiceType() also, in the class representing the singleton, remember to override the InitializeLifetimeService property... or the singleton object will get Garbage collected at some point public override object InitializeLifetimeService() { return (null); } From the server, just call your singleton classes' static factory method to get access to that singleton instance... Do not use remoting calls at all.

Then, in your server, Use RemotingServices. Marshal(singletonInstance, MesgURI); Instead of RegisterWellKnownServiceType() also, in the class representing the singleton, remember to override the InitializeLifetimeService property... or the singleton object will get Garbage collected at some point... public override object InitializeLifetimeService() { return (null); } From the server, just call your singleton classes' static factory method to get access to that singleton instance... Do not use remoting calls at all...

That worked perfectly! Thanks for the quick response! – Todd Apr 9 '09 at 20:50.

I've never tried to call Activator. GetObject from the server-side, but that should return the same instance that the clients are using. But, you're still going to get a proxy.

No. There is no way to read the memory of the client in the server.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions