2011-07-10 60 views
4

我剛從MVC2遷移到MVC3,我得到了下面的錯誤,當我生成項目:MVC2到MVC3 IOC問題

RhinoIoCControllerFactory不實現接口成員System.Web.Mvc.IControllerFactory.GetControllerSessionBehavior(System.WebRouting

 public class RhinoIoCControllerFactory : IControllerFactory 
     { 

      public IController CreateController(RequestContext requestContext, string controllerName) 
      { 
       return IoC.Resolve<IController>((controllerName + "Controller").ToLower()); 
      } 

      public void ReleaseController(IController controller) 
      { 
       IoC.Container.Release(controller); 
      } 

     } 

任何想法:.RequestContext,字符串)

下面是RHE類哪兒來的錯誤?

謝謝

回答