link
Avalon
Avalon Castle - Managed Extensions
Home PlanetProductsCentral
Exposing the server

ManagementExtensions hides from developer all the complexity dealing with .Net Remoting architecture. To expose your MServer through TCP (or HTTP) you need to create a MConnectorServer instance. By now the only formatter supported is the binary one.

MConnectorServer serverConn = 
   MConnectorServerFactory.CreateServer( "provider:http:binary:test.rem", null, null );

ManagedObjectName name = new ManagedObjectName("connector.http:formatter=binary");

server.RegisterManagedObject( serverConn, name );
Connecting to server

The same strategy is used to connect from a client. Once you've connected, you can extract the component tree from MServer, invoke methods and change component attributes.

MConnector connector = 
   MConnectorFactory.CreateConnector( "provider:http:binary:test.rem", null );
  
MServer server = (MServer) connector.ServerConnection;
String[] domains = server.GetDomains();

Obviously the connection string must match. You can use ASP.Net or Winforms to construct a client application for manage your application. Unfortunatelly, due to license issues, we can't provide a sample using either of these technologies. But you can see the test cases to get a glimpse of how it can be accomplished.