Is it possible to use Castle to self host a WCF service but use all the WCF 
endpoint/binding info from app.config (as oppossed to setting in code via 
DefaultServiceModel)?

Are there any good examples of this?

I tried the following but got InvalidOperationException

//code          
container.AddFacility<WcfFacility>();
..
..
container.Register(
                Component.For<IAuthenticationService>()
                         .ImplementedBy<AuthenticationService>()
                         .Named("AuthenticationService") 
                         .AsWcfService()
                         .LifestyleTransient()
                );

//config 
  <system.serviceModel>
    <services>
      <service name="AuthenticationService">
        <endpoint name ="AuthenticationService_NetTcp" 
address="net.tcp://localhost:9872/authenticationservice.svc" 
binding="netTcpBinding" contract="Foo.IAuthenticationService" />
      </service>
    </services>  
  </system.serviceModel>

//exception
AuthenticationService' has zero application (non-infrastructure) endpoints. 
This might be because no configuration file was found for your application, 
or because no service element matching the service name could be found in 
the configuration file, or because no endpoints were defined in the service 
element.

.Net 3.5
Castle 3.3.0
Windows 2012

thanks

scott

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to