找不到方法:'System.Web.Hosting.HostingEnvironment.get_InClientBuildManager'

时间:2014-07-09 19:20:57

标签: c# asp.net-mvc linux razor mono

我在Linux机器上运行ASP.NET MVC 4应用程序感谢Mono,我的问题是,每次运行它几秒钟而不是显示页面我都会得到以下错误:

System.MissingMethodException
Method not found: 'System.Web.Hosting.HostingEnvironment.get_InClientBuildManager'.

说明

HTTP 500.Error processing request.

详细说明:

Non-web exception. Exception origin (name of application or object): mscorlib.

异常堆栈跟踪:

  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 

版本信息(服务器是xsp):

3.2.8 (Debian 3.2.8+dfsg-4ubuntu1); ASP.NET Version: 4.0.30319.17020

详细信息:

[System.Web.HttpException]: The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation. at System.Web.Compilation.BuildManager.CallPreStartMethods () [0x00000] in :0 at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00000] in :0 [System.Reflection.TargetInvocationException]: Exception has been thrown by the target of an invocation. at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in :0 at System.Web.Compilation.BuildManager.CallPreStartMethods () [0x00000] in :0 [System.MissingMethodException]: Method not found: 'System.Web.Hosting.HostingEnvironment.get_InClientBuildManager'. at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0

正如我所说,这个错误在开始申请后不久就消失了,但我正在寻找解决方案。我在其他机器上没有类似的错误。

版本信息(Debian + Nginx + FastCGI):

3.6.1 (master/1910095 Mon Jul 7 12:30:38 CEST 2014); ASP.NET Version: 4.0.30319.17020

0 个答案:

没有答案