I am using the sample from castle @ http://old.castleproject.org/container/facilities/trunk/remoting/containersconnected.html for "Scenario: Using the container on both endpoints and use the container components"
The only update I have made to this is one line in the config files from type="Castle.Facilities.Remoting.RemotingFacility, Castle.MicroKernel" to type="Castle.Facilities.Remoting.RemotingFacility, Castle.Windsor" as suggested by Mauricio in question Castle remoting facility not working
I also updated the references in both the client and server to use latest castle dlls. The server starts up successfully but the client does not. I get the following exception on the client:
Could not set up component 'remote.console.component'. Type 'System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' does not implement service 'Example.Shared.IRemoteConsole, Example.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Any suggests on what I am doing wrong?
The fol开发者_如何转开发lowing is the client config file
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor"/>
</configSections>
<castle>
<facilities>
<facility id="remote.facility"
type="Castle.Facilities.Remoting.RemotingFacility, Castle.Windsor"
baseUri="tcp://localhost:2133"
isClient="true"
remoteKernelUri="tcp://localhost:2133/kernel.rem"
remotingConfigurationFile="RemotingTcpConfigClient.config">
</facility>
</facilities>
<components>
<component
id="remote.console.component"
service="Example.Shared.IRemoteConsole, Example.Shared"
type="System.Object, mscorlib"
remoteclient="component"/>
</components>
</castle>
</configuration>
Replace:
<component
id="remote.console.component"
service="Example.Shared.IRemoteConsole, Example.Shared"
type="System.Object, mscorlib"
remoteclient="component"/>
with:
<component
id="remote.console.component"
type="Example.Shared.IRemoteConsole, Example.Shared"
remoteclient="component"/>
精彩评论