I set up a simple .NET remotin开发者_如何转开发g server (a console .exe) and .NET remoting client (another console .exe) on the same computer. One of my friends told me that if your remoting client and server are on the same computer, Windows automatically merges them into the same process. I checked task manager, and there appears to be two separate processes for the client and server. Is there any truth to this one-process claim? If so, is there any simple way to configure remoting of two exes on the same machine to use the same process or not use the same process?
As they are two executables, each will be in its own process, as you have seen.
There is no simply way to "merge" processes, definitely not with configuration only. Each executable has its own process and you can't have an executable "live" within another.
You can tell your friend that he is wrong, and that he should prove you wrong, if he can.
Point him to the documentation on Application Domains.
Your friend is wrong. Executing two separate EXE files will create two (or more) processes. Nothing that's exposed to you in Windows can take one process and make it execute inside another.
The whole idea of remoting it inter process communication: communicating between processes. If it's all in the same process, why use remoting at all? You're certainly not going to realize any significant performance gain by putting the client and server into a single process.
精彩评论