Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3343438
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:57:17+00:00 2026-05-18T00:57:17+00:00

I am trying to following book : Pro ASP.NET MVC Framework by Steven Sanderson

  • 0

I am trying to following book : Pro ASP.NET MVC Framework by Steven Sanderson…

The line container = new WindsorContainer(xi); produces this error:

Could not convert from ‘DomainModel.Abstract.IPeopleRepository, DomainModel’ to System.Type – Maybe type could not be found**

public WindsorControllerFactory()
{
    ConfigResource confres = new ConfigResource("castle");

    XmlInterpreter xi = new XmlInterpreter(confres);

    container = new WindsorContainer(xi);

    // Also register all the controller types as transient
    var controllerTypes = from t in Assembly.GetExecutingAssembly().GetTypes()
                          where typeof(IController).IsAssignableFrom(t)
                          select t;

    foreach (Type t in controllerTypes)
    {
        container.AddComponentLifeStyle(t.FullName, t, LifestyleType.Transient);
    }
}

The castle config:

  <castle>
    <components>
      <component id="PeopleRepository"
                 service="DomainModel.Abstract.IPeopleRepository, DomainModel"
                 type="DomainModel.Concrete.FakePeopleRepository, DomainModel" 
                 >

How can this be fixed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:57:17+00:00Added an answer on May 18, 2026 at 12:57 am

    Sanderson’s book is outdated about the MVC-Windsor integration. Don’t code your own (or the book’s) controller factory. Use MVCContrib‘s Windsor integration instead.

    Also, registering controllers within the controller factory is plain bad practice. The controller factory is there to instantiate controllers, not to manage container registrations.

    UPDATE: MvcContrib for ASP.NET MVC 3 removed all controller factories and deprecated all IoC integrations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to MVC and I have been following Steven Andersons Pro ASP.Net
I have been following the SportsStore example project in Apress Pro ASP.NET MVC 3
I'm quite new to vim. I'm trying tuning vim up by following a book
I am trying connect the asp.net membership tables in to an asp.mvc 3 website.
i'm trying to learn codeigniter (following a book) but don't understand why the web
Info: I'm currently trying to learn template metaprogramming (by following this book ). One
I'm following Aaron Hillegrass's book (trying), and am at the point trying to bind
I am trying to comprehend Perl following the way describe in the book Minimal
I'm trying to learn C from an unnamed book that contains the following sample
I'm trying to learn monotouch at the moment, and following the learn monotouch book

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.