I had problems with Castle and MVC2 in VS 2010 Beta 2.
I was able to get Castle working with this code for the GetControllerInstance. The problem was that all requests were coming into this (like css files), so just returning null for those seems to work.
protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
{
if (controllerType == null) { return null; }
return (IController)_container.Resolve(controllerType);
}
-Damien
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…