Create and configure a server application.
- Create a server application domain.
- Configure a server application programmatically.
- Configure a server application by using configuration files.
- Compile and build a server application.
Basically an application domain is the isolated space where an application exists. Its storage and memory allocation are completely separated from other applications. The problem with distributed applications is that because of this isolation it becomes difficult for applications to pass information between application domains. Web Services and remoting are two of the answers to this problem. With remoting, you are passing special Remoting Types between app domains so that two applications can talk to each other. In this relationship one of the applications must serve as the remoting server and the other as the remoting client. The application boundaries can be on the same machine, on different machines, even in different networks.
To create the server environment to support remoting you must do two things: Choose and Register a channel, which is either a tcp port with binary formatting or http with SOAP formatting, and Register your type with the .Net Remoting system. Server or Listner Applications can be any type of application: a form app, a web app or a windows service. The application must be running in order to receive requests.
The server environment can be configured either programmatically or through configuration.
To register the remoting type and channel programmatically, you must register a channel and then the type.The following sample code from msdn for registering a type and a channel from msdn is below:
TcpChannel chan = new TcpChannel(8085);
To register the remoting type and channel through configuration simply call the RemotingConfiguration.Configure method passing in the name/path to the configuration file. A sample configuration file from msdn is below:
<channel ref="http" port="8989"/>
Other Resources & Links:
Application Domains Overview
An Introduction to Microsoft .Net Remoting Framework