2012-12-18 61 views
1

我試圖在VS2012中使用webAPI註冊路由。在GlobalConfiguration.Configuration.Routes它拋出下面的錯誤。有人可以幫我弄這個嗎?找不到方法:'System.Web.Http.Controllers.ServicesContainer


Server Error in '/' Application. 
Method not found: 'System.Web.Http.Controllers.ServicesContainer 
System.Web.Http.HttpConfiguration.get_Services()'. 
Description: An unhandled exception occurred during the execution of the current web request.  
Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.MissingMethodException: Method not found: 'System.Web.Http.Controllers.ServicesContainer System.Web.Http.HttpConfiguration.get_Services()'. 

Source Error: 

An unhandled exception was generated during the execution of the current web request.  
Information regarding the origin and location of the exception can be identified using the  
exception stack trace below. 

回答

1

聽起來像是你需要的System.Web.Http.Common.dll組裝。