

#Multiple idatabase registration windsor code#
If you want, I can modify it to be configured through code instead of through the app.config file. I did it this way because this is what I am familiar with. Here's how I got this to work self hosted using an app.config file. Public class InstitutionDataService : IInstitutionDataService Public class AccountDataService : IAccountDataService AddBaseAddresses(baseAddress + "InstitutionDataService")Ĭonsole.WriteLine("Press any key to exit.") AddBaseAddresses(baseAddress + "AccountDataService") PublishMetadata(mex => mex.EnableHttpGet()) String baseAddress = " _container.Register( ServiceDebugBehavior returnFaults = new ServiceDebugBehavior Private static WindsorContainer _container if you wanted to expose a BasicHttpEndpoint and a WSHttpEndpoint for the same service) using System Each service needs a unique address, but you can expose multiple unique endpoints relative to that base address per service using the At() method on WcfEndpoint. The other difference is I'm specifying a unique address per service in the AddBaseAddress method.

To be honest, I'm not sure how Windsor would behave if the same interface is registered twice and it's not a decorator pattern (see this post about Windsor and decorators). One difference is I'm using the PublishMetadata method on DefaultServiceModel instead of registering that with the IServiceBehavior. Here's how I got it working configuring through the code with no app.config file. So, my question is, why aren't my components being registered along with the AccountDataService? Also, if it helps, this is my svc markup: None of the components appeared to be registered. And I have attempted to implement the solution suggested in this SO question:īut this also did not work. This has been quite frustrating and I can't seem to find a straight answer in the Castle Windsor docs (or lack there of). But when I try and add a service reference to InstitutionDataService it throws an exception saying: Could not find a component with name InstitutionDataService, did you forget to register it? Now when I try and get a service reference for AccountDataService, it works fine, no errors. ForContract(typeof(ITransactionDataService)) ForContract(typeof(IRelationshipDataService)) ForContract(typeof(IInstitutionDataService)) ForContract(typeof(IAccountDataService))

Var metadata = new ServiceMetadataBehavior ) Var returnFaults = new ServiceDebugBehavior var baseUri = new Uri(" _container = new WindsorContainer() Anyways, I have been struggling with this for several days and haven't found the reason for this yet.įirst, I registered my services using Castle Windsor. I very green when it comes to WCF and Castle Windsor IoC container so that would probably be the first reason why this is happening.
#Multiple idatabase registration windsor download#
Under How to, click the link in step 1 to download the registration template used for all database types.dit the file to add information about each database instance. I haven't found anyone else with this issue so I'm assuming it is my own fault that this is happening. Multiple idatabase registration windsor npoco If you are registering multiple nodes in an Oracle RAC, manually create the monitoring user before you run mass registration.
