Udostępnij za pośrednictwem


Remoting Cross AppDomains

Download Sample

This topic is specific to a legacy technology that is retained for backward compatibility with existing applications and is not recommended for new development. Distributed applications should now be developed using the Windows Communication Foundation (WCF).

This sample shows how to use .NET Framework remoting to communicate between AppDomains. Additionally, this sample shows how to achieve AppDomain isolation for loading of assemblies to maintain security boundaries for untrusted assemblies.

To build the sample using the command prompt

  1. Open a command prompt and, depending on your choice of programming language, navigate to the appropriate language specific subdirectory.

  2. Type msbuild.exe RemotingCrossAppDomain.sln at the command line.

To build the sample using Visual Studio

  1. Open Windows Explorer and, depending on your choice of programming language, navigate to the appropriate language specific subdirectory.

  2. Double-click the icon for RemotingCrossAppDomain.sln to open the file in Visual Studio.

  3. On the Build menu, click Build Solution.

    The application will be built in the default \bin or \bin\Debug directory.

To run the sample

  1. Navigate to the directory containing the new executable, using the command prompt or Windows Explorer.

  2. Type Application.exe at the command line, or double-click the icon for Application.exe to launch it from Windows Explorer.