Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iis 7 未找到具有Razor抛出方法的MVC3:';System.Object System.Web.Mvc.ControllerBase.get_ViewModel()';_Iis 7_Asp.net Mvc 3_Razor - Fatal编程技术网

Iis 7 未找到具有Razor抛出方法的MVC3:';System.Object System.Web.Mvc.ControllerBase.get_ViewModel()';

Iis 7 未找到具有Razor抛出方法的MVC3:';System.Object System.Web.Mvc.ControllerBase.get_ViewModel()';,iis-7,asp.net-mvc-3,razor,Iis 7,Asp.net Mvc 3,Razor,Win Server 2008 R2上的全新IIS7.5安装 通过Web平台安装程序安装MVC3等 在本地制作了一个基本的MVC3应用程序。只是“新项目”,没有任何内容。 在IIS上创建应用程序以承载该应用程序。AppPool设置为.Net4 当我在本地运行应用程序时,我得到以下信息: 大宗报价 找不到方法:“System.Object” System.Web.Mvc.ControllerBase.get_ViewModel()。 描述:未处理的异常 在执行过程中发生 当前web请求。请检查 有

Win Server 2008 R2上的全新IIS7.5安装

通过Web平台安装程序安装MVC3等

在本地制作了一个基本的MVC3应用程序。只是“新项目”,没有任何内容。 在IIS上创建应用程序以承载该应用程序。AppPool设置为.Net4

当我在本地运行应用程序时,我得到以下信息:

大宗报价

找不到方法:“System.Object” System.Web.Mvc.ControllerBase.get_ViewModel()。 描述:未处理的异常 在执行过程中发生 当前web请求。请检查 有关堆栈跟踪的详细信息,请参阅 错误及其来源 密码

例外情况详情: System.MissingMethodException:方法 找不到:“System.Object” System.Web.Mvc.ControllerBase.get_ViewModel()

源错误:

生成了一个未处理的异常 在执行当前 网络请求。有关 例外的来源和位置 可以使用异常来识别 堆栈跟踪如下

堆栈跟踪:

[MissingMethodException:方法不可用 找到:'System.Object System.Web.Mvc.ControllerBase.get_ViewModel()'。] MinTest.Controllers.HomeController.Index() 在C:\Projects\MinTest\MinTest\Controllers\HomeController.cs:17中 lambda_方法(闭包、控制器基) ,Object[])+79
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary
2
参数)+264
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext,ActionDescriptor actionDescriptor,IDictionary
2 参数)+39
System.Web.Mvc.c_DisplayClass15.b_12() +129 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter 过滤器,ActionExecutingContext 前文本,Func
1续)
+784922 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext
controllerContext,IList
1过滤器, ActionDescriptor ActionDescriptor, IDictionary`2参数)+314
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext,字符串actionName) +784976 System.Web.Mvc.Controller.ExecuteCore() +159 System.Web.Mvc.ControllerBase.Execute(请求上下文 请求上下文)+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 步骤、布尔值和同步完成) +371

我迷路了


t、

我认为您实际上没有在IIS中加载MVC 3。听起来你要换成MVC2了。仔细检查服务器上的MVC 3安装。还要检查Web.Config中的
bindingRedirect

你说得对!某种程度上。。生产环境是MVC3,但我的开发机器在MVC3 RC上:)