Freigeben über


I took some notes on some remoting questions I recently answered...

  • Server activated objects (SAOs both singleton and singlecall) use threadpool magic to execute remoting calls on thread pool threads. See ThreadPool.QueueUserWorkItem in the docs. Also note that you can change the # of thread pool threads…the default is 25 per proc.

 

  • It is possible to share data with Singlecall object instances by having static members in the shared class. I would only recommend this for read-only scenarios and use Singletons for any other scenario. Keep in mind that you are responsible for thread safety.
  • Both the TCP and HTTP channels were designed to assume that there is network connectivity. Using these channels between processes on the same box that’s disconnected from the network won’t work out of the box. To get this to work you have to bind the channel to the loopback address (either 127.0.0.1 or 0.0.0.0). In .NET 2.0 you can simply use the IPC channel to do remoting sans network.

<channels>

         <channel ref="http" port="8889" bindTo="127.0.0.1">

         </channel>

</channels>