Hi and hello !

Much thanks ! I was that tired yesterday, that I have'nt had time to post 
my own answer ;-)

The problem was, that I didnt recognize, that I've used the wrong signature:

    <parameters>
        <*serviceBase*>${
TheServiceToControl}</serviceBase>
    </parameters>

must be:

    <parameters>
        <*baseService*>${TheServiceToControl}</baseService>
    </parameters>

because in code, there is this:

public ServiceHost(ServiceBase baseService)

I thought, I had to specify the baseclass, but it looks like, it is the
name of the parameter !!!!!

Anyway, learned a little bit ...
Much thanks for your help!

br,
++mabra




Am Mittwoch, 3. April 2013 22:54:19 UTC+2 schrieb Mehmet Zahir SOLAK:
>
> Hello mabra,
>
> ServiceToHandle1 is assembly name?
>
> Can you try as follows:
> <component id="TheServiceToControl"
>    service="ServiceDemo.*ServiceBase*, ServiceToHandle1"
>    type="ServiceDemo.ServiceToHandle, ServiceToHandle1"></component>
>
>
>
>
> On Wed, Apr 3, 2013 at 12:35 PM, mabra <[email protected] <javascript:>>wrote:
>
>> Hello !
>>
>> I have the following class:
>>
>> "ServiceHost:IServiceHost" with the following constructor:
>>
>> "public ServiceHost(ServiceBase baseService)"
>>
>> If I manuall pass-in my "ServiceToHandle:ServiceBase" [see below] as the 
>> "baseService", everything
>> is well. Now, I try to do the same via xm-configuration and I configured 
>> two mappings:
>>
>> <component id="TheServiceToControl"
>>    service="ServiceDemo.ServiceToHandle, ServiceToHandle1"
>>    type="ServiceDemo.ServiceToHandle, ServiceToHandle1"
>> >
>> </component>
>>
>> <component id="TheServiceController-AKA-ServiceHost"
>>    service="ServiceDemo.IServiceHost, IServiceHost"
>>    type="ServiceDemo.ServiceHost, ServiceHost"
>> >
>>     <parameters>
>>         <*serviceBase*>${TheServiceToControl}</serviceBase>
>>     </parameters>
>>
>> </component>
>>
>> When I am loading:
>>
>> var container = new WindsorContainer(new XmlInterpreter());
>> IServiceHost host = container.Resolve<IServiceHost>();
>>
>> I am expecting a configured host object [which has to be contructed with 
>> the additional "TheServiceToControl"
>> object]. But I am getting an ugly error:
>>
>>
>> Unhandled Exception: Castle.MicroKernel.Handlers.HandlerException: Can't 
>> create component
>> 'TheServiceController-AKA-ServiceHost' as it has dependencies to be 
>> satisfied.
>>
>> 'TheServiceController-AKA-ServiceHost' is waiting for the following 
>> dependencies:
>> - Service 'System.ServiceProcess.ServiceBase' which was not registered.
>>
>> I tried to add System.ServiceBase assembly, but found no way, that it can 
>> be found !
>>
>> If someone probably can explain, what is happeing here, that would be 
>> really great!!
>>
>> BTW: Additionally,I cannot find a description of the parameters [see my 
>> *bold 
>> *word above].
>>
>> Thanks anyway and
>> best regards,
>> ++mabra
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Castle Project Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to 
>> [email protected]<javascript:>
>> .
>> Visit this group at 
>> http://groups.google.com/group/castle-project-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to