Windsor IHandlerSelector in RIA Services Visual Studio 2010 Beta2

Posted by Savvas Sopiadis on Stack Overflow See other posts from Stack Overflow or by Savvas Sopiadis
Published on 2010-03-15T19:58:40Z Indexed on 2010/03/15 19:59 UTC
Read the original article Hit count: 307

Filed under:
|

Hi everybody! I want to implement multi tenancy using Windsor and i don't know how to handle this situation:

i succesfully used this technique in plain ASP.NET MVC projects and thought incorporating in a RIA Services project would be similar.

So i used IHandlerSelector, registered some components and wrote an ASP.NET MVC view to verify it works in a plain ASP.NET MVC environment. And it did!

Next step was to create a DomainService which got an IRepository injected in the constructor. This service is hosted in the ASP.NET MVC application. And it actually ... works:i can get data out of it to a Silverlight application.

Sample snippet:

public OrganizationDomainService(IRepository<Culture> cultureRepository)
{
            this.cultureRepository = cultureRepository;
}

Last step is to see if it works multi-tenant-like: it does not! The weird thing is this: using some line of code and writing debug messages in a log file i verified that the correct handler is selected! BUT this handler seems not to be injected in the DomainService. I ALWAYS get the first handler (that's the logic in my SelectHandler)

Can anybody verify this behavior? Is injection not working in RIA Services? Or am i missing something basic??

Development environment: Visual Studio 2010 Beta2

Thanks in advance

© Stack Overflow or respective owner

Related posts about ria-services

Related posts about castle