2011-01-26 21 views
2

Windows Server 2008 R2に新しいIIS7.5インストール。MVC3 with Razor throwsメソッドが見つかりません: 'System.Object System.Web.Mvc.ControllerBase.get_ViewModel()'

Webプラットフォームインストーラを使用して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

関連する問題