We don't handle WAS well yet.  I believe the recommended approach is to create 
a custom ServiceHostFactory and initialize the container there.  This is 
necessary since WAS does not call any well defined starting point like in 
ASP.NET.  Perhaps this link can help 
http://blog.ploeh.dk/2010/05/18/SneakViewAtCastlesWCFFacility.aspx

We do plan on integrating this into WCF Facility soon

-craig

On Nov 26, 2010, at 11:19 AM, Khash wrote:

> Aha! Thanks! I removed it and it is now better (I still have issues
> but I think that's due to my bad configuration of the container).
> 
> However, this brings me to another question:
> What project type I should use if I want to have my services hosted in
> WAS and where would this code go in that project?
> 
> Thanks.
> 
> On Nov 25, 9:39 pm, Craig Neuwirt <[email protected]> wrote:
>> The *.Hosted() *in the configuration is used when your service is hosted in
>> IIS or WAS.  This defers creation of the ServiceHost to the hosting
>> environment.  If you are not hosted and you specify .Hosted(), no
>> ServiceHost will be created.  Trying removing that and see what happens.
>> 
>> 
>> 
>> On Thu, Nov 25, 2010 at 10:24 AM, Khash <[email protected]> wrote:
>>> No. But how does it make a difference?
>> 
>>> On Nov 24, 9:55 pm, cneuwirt <[email protected]> wrote:
>>>> Are you hosting this in IIS?
>> 
>>>> On Nov 24, 11:34 am, Khash <[email protected]> wrote:
>> 
>>>>> I'm using the following code to host multiple services at the same
>>>>> time (CW 2.5)
>> 
>>>>>             IWindsorContainer container = new WindsorContainer();
>>>>>             container.AddFacility<WcfFacility>();
>> 
>>>>>             container.Register(AllTypes
>>>>>                                    .FromAssemblyNamed("MyAssembly")
>>>>>                                    .Pick()
>>>>>                                    .If(t =>
>>>>> (t.Name.EndsWith("Service") || t.Name.EndsWith("Repository")))
>>>>>                                    .WithService
>>>>>                                    .AllInterfaces()
>>>>>                                    .Configure(c => c
>> 
>>>  .LifeStyle.Transient
>> 
>>>  .AsWcfService(new
>>>>> DefaultServiceModel()
>> 
>>>  .AddBaseAddresses("http://
>>>>> localhost:1010")
>> 
>>>  .AddEndpoints(WcfEndpoint
>> 
>>>                    .BoundTo(new
>>>>> BasicHttpBinding())
>> 
>>>                    .At(c.Implementation.Name<http://c.implementation.name/>
>>> ))
>> 
>>>  .Hosted()
>> 
>>>  .PublishMetadata(o
>>>>> => o.EnableHttpGet().AtAddress(string.Format("{0}/mex",
>>>>> c.Implementation.Name <http://c.implementation.name/>))))));
>> 
>>>>> But I can't see the services hosted using wcftestclient.
>> 
>>>>> Any suggestions where I'm going wrong?
>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Castle Project Users" group.
>>> To post to this group, send email to [email protected]
>>> .
>>> To unsubscribe from this group, send email to
>>> [email protected]<castle-project-users%2Bun 
>>> [email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/castle-project-users?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Castle Project Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/castle-project-users?hl=en.
> 

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

Reply via email to