views:

51

answers:

1

I'm trying to host a WCF service inside a console app using Castle-Windsor 2.5 (.NET 4) with the following code:

        new WindsorContainer()
            .AddFacility<WcfFacility>()
            .Register(
            Component.For<IMyService>().ImplementedBy<MyService>()
                          .ActAs(new DefaultServiceModel()
                                             .AddEndpoints(
                                             WcfEndpoint.BoundTo(new BasicHttpBinding()).At("http://localhost:1010/MyService"),
                                             WcfEndpoint.BoundTo(MetadataExchangeBindings.CreateMexHttpBinding()).At("http://localhost:1010/MyService/mex"))
                                         ));

I don't have and prefer not to have any config in my app.config for WCF if possible.

This however doesn't seem to work (doesn't complain but WcfTestUtil can't see the service).

Am I missing anything?

+1  A: 

Posted the question on Castle Google Groups and got much better feedback but since SO is more Google friendly than Google Groups (Irony!), am going to post the link to the answer here for others: http://groups.google.com/group/castle-project-users/browse_thread/thread/d670d8f1d7aae0ab

Khash