Home

Castle Stronghold

Scenario: Using the container on both endpoints but just to configure remoting

You may also use the container and the facility on both endpoints but just to configure .net remoting.

The following snippets exemplifies this usage.

 

<castle>

    <facilities>
        <facility 
            id="remote.facility" 
            type="Castle.Facilities.Remoting.RemotingFacility, Castle.MicroKernel"
            baseUri="tcp://localhost:2133"
            remotingConfigurationFile="RemotingTcpConfigClient.config">
        </facility>    
    </facilities>
    
    <components>
        <component 
            id="remoteconsolecomponent" 
            service="Example.Shared.IRemoteConsole, Example.Shared"
            type="System.Object, mscorlib"
            remoteclient="singleton" />
    </components>

</castle>

<castle>

    <facilities>
        <facility 
            id="remote.facility" 
            type="Castle.Facilities.Remoting.RemotingFacility, Castle.MicroKernel"
            remotingConfigurationFile="RemotingTcpConfig.config">
        </facility>    
    </facilities>
    
    <components>
        <component 
            id="remote.console.component" 
            service="Example.Shared.IRemoteConsole, Example.Shared"
            type="ServerApp.RemoteConsoleImpl, ServerApp"
            remoteserver="singleton" uri="remoteconsolecomponent" />
    </components>

</castle>
Google
Search WWW Search castleproject.org