2011-01-26 5 views
2

Windows Server 2008 R2에 최신 IIS7.5 설치.면도날이있는 MVC3 메서드를 찾을 수 없습니다. 'System.Object System.Web.Mvc.ControllerBase.get_ViewModel()'

Web Platform Installer를 통해 설치된 MVC3 등.

로컬로 기본 MVC3 응용 프로그램을 만들었습니다. 아무 것도없는 "새 프로젝트". 응용 프로그램을 호스팅 할 IIS에서 응용 프로그램을 만들었습니다. AppPool을 .Net4로 설정합니다. 내가 로컬 응용 프로그램을 실행할 때

난이 얻을 : 내가 잃었어요

Blockquote

Method not found: 'System.Object System.Web.Mvc.ControllerBase.get_ViewModel()'. 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.Object System.Web.Mvc.ControllerBase.get_ViewModel()'.

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.

Stack Trace:

[MissingMethodException: Method not found: 'System.Object System.Web.Mvc.ControllerBase.get_ViewModel()'.] MinTest.Controllers.HomeController.Index() in C:\Projects\MinTest\MinTest\Controllers\HomeController.cs:17 lambda_method(Closure , ControllerBase , Object[]) +79
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary 2 parameters) +264
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 parameters) +39
System.Web.Mvc.<>c_DisplayClass15.b_12() +129 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func 1 continuation) +784922 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList 1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +314
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +784976 System.Web.Mvc.Controller.ExecuteCore() +159 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335
System.Web.Mvc.<>c_DisplayClassb.b_5() +62 System.Web.Mvc.Async.<>c_DisplayClass1.b_0() +20 System.Web.Mvc.<>c_DisplayClasse.b_d() +54 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +453 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +371

!

t.

답변

1

실제로 IIS에서 MVC 3을로드하지 않는다고 생각합니다. MVC 2가 대신 들리는 것 같습니다. MVC 3 설치를 서버에서 다시 확인하십시오. 또한 Web.Config에서 bindingRedirect을 검사하십시오.

+1

네가 맞아! 일종의 .. 생산 환경은 MVC3 이었지만 내 개발 기계는 MVC3 RC에있었습니다. :) – Thomas

관련 문제