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 3786468
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:41:16+00:00 2026-05-19T11:41:16+00:00

I have implemented a System.Web.Mvc.IDependencyResolver which looks up services registered with Castle Windsor. My

  • 0

I have implemented a System.Web.Mvc.IDependencyResolver which looks up services registered with Castle Windsor. My GetService(Type serviceType) implementation is below (for MVC3 RC2).

public object GetService(Type serviceType)
{
    object service = null;
    try
    {
        service = _container.Resolve(serviceType);
    }
    catch(Exception ex)
    {
        Logger.Warn("Could not resolve service-type {0} via {1}", 
            serviceType.Name, _resolverName);
    }

    return service;
}

This works well, but I have a question about warnings that I see in my logs (I log all exceptions as ‘Warn’ – see the code above):

WARN  Default [] - Could not resolve service-type Index_cshtml via
    WindsorDependencyResolver
WARN  Default [] - Could not resolve service-type RegistrationForm_cshtml via
    WindsorDependencyResolver
WARN  Default [] - Could not resolve service-type LoginForm_cshtml via
    WindsorDependencyResolver

These are views. Is this expected behaviour? If so, why is the dependency resolver asked to find views? If not, what should I be doing to resolve this?

Note that I haven’t registered an instance of IViewPageActivator (see the warning, below) which should signal to the framework that views should be resolved in the default manner. Why do I still see requests for views through my dependency resolver?

WARN  Default [] - Could not resolve service-type IViewPageActivator via 
    WindsorDependencyResolver
  • 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-19T11:41:17+00:00Added an answer on May 19, 2026 at 11:41 am

    IDependencyResolver in MVC3 could resolve views as well as other types. This could be very useful in case when you need to change view implementations for example when you are unit-testing your solution.
    More details: http://bradwilson.typepad.com/blog/2010/10/service-location-pt11-view-page-activator.html:

    The logic in BuildManagerCompiledView
    consults the dependency resolver,
    calling
    GetSerivce(typeof(IViewPageActivator))
    and using the provided service when
    present. If there is no
    IViewPageActivator present in the
    dependency resolver, we will then ask
    the dependency resolver to create the
    concrete view page type by calling
    GetService(viewPageType). If the
    dependency resolver also fails to
    create the concrete view page type, we
    finally fall back to the MVC 2
    behavior of using
    Activator.CreateInstance to create the
    view page type.

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

Sidebar

Related Questions

I have implemented a repository pattern in my asp.net mvc web application... But i
I have a Library application which is already implemented in spring MVC. I need
I have a Restful web service developed in Spring MVC which currently returns farmer
I'm curious why only some System.Web.UI.WebControl controls implement certain interfaces when they have the
I have implemented tracing based on System.Diagnostics. I am also using a System.Diagnostics.TextWriterTraceListener, and
I have implemented a very basic plug-in system as part of a static library
I have implemented below function in a separate .js script file which I load
I have a MVC web site that worked well, until I moved it into
I used mvc 4.0 to develop my web application, I have created a pager
I have a main MasterPage which has a single column layout for the web

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.