I would like to use Castle Windsor for dependency injection for my solution consisting of the following projects:
- Mvc [ASP.NET MVC 3 Web Application]: presentation layer (depends on Business and Models)
- Business [Class Library]: business layer (depends on DataAccess and Models)
- DataAccess [Class Library]: data access layer (depends on Models)
- Models [Class Library]: model layer
In the business layer there is a class called PostService implementing IPostService that manages blog posts. The PostsController of the Mvc project depends on IPostService. However, PostService (the corresponding concrete implementation) itself depends on IPostRepository.
Where do I configure Castle Windsor to return an instance of PostRepository to resolve IPostRepository? The Mvc project doesn’t know about the DataAccess project. Thus, I can’t configure the component bindings in global.asax or somewhere else within Mvc.
[Update] Dependency Diagram
Now that I’ve found a solution (thanks again, Darin Dimitrov!) I’d like to share the current dependency diagram with you.

You should configure the DI container in the MVC project. This is where everything comes into live. This where all the assemblies must be referenced including the data access layer of course (without referencing a concrete data access your MVC application simply cannot work). So the MVC application knows all about the other layers.
Application_Startin Global.asax is a good place to configure a DI container.