找不到方法:“System.Reflection.MethodInfo System.Reflection.PropertyInfo.get_GetMethod

帅得_被人砍 2015-01-20 12:21:03
诚心求教MVC运行的错误。都不知道是什么问题引起的,求教大神谢谢了

“/”应用程序中的服务器错误。
找不到方法:“System.Reflection.MethodInfo System.Reflection.PropertyInfo.get_GetMethod()”。
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.MissingMethodException: 找不到方法:“System.Reflection.MethodInfo System.Reflection.PropertyInfo.get_GetMethod()”。

源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[MissingMethodException: 找不到方法:“System.Reflection.MethodInfo System.Reflection.PropertyInfo.get_GetMethod()”。]
System.Web.WebPages.PropertyHelper.<GetProperties>b__0(PropertyInfo prop) +0
System.Linq.WhereArrayIterator`1.MoveNext() +55
System.Web.WebPages.PropertyHelper.GetProperties(Object instance, Func`2 createPropertyHelper, ConcurrentDictionary`2 cache) +211
System.Web.WebPages.PropertyHelper.GetProperties(Object instance) +53
System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached(Object value) +45
System.Web.Mvc.RouteCollectionExtensions.CreateRouteValueDictionaryUncached(Object values) +59
System.Web.Mvc.RouteCollectionExtensions.MapRoute(RouteCollection routes, String name, String url, Object defaults, Object constraints, String[] namespaces) +97
System.Web.Mvc.AreaRegistrationContext.MapRoute(String name, String url, Object defaults, Object constraints, String[] namespaces) +58
MCU.Areas.Admin.AdminAreaRegistration.RegisterArea(AreaRegistrationContext context) +105
System.Web.Mvc.AreaRegistration.CreateContextAndRegister(RouteCollection routes, Object state) +104
System.Web.Mvc.AreaRegistration.RegisterAllAreas(RouteCollection routes, IBuildManager buildManager, Object state) +195
System.Web.Mvc.AreaRegistration.RegisterAllAreas(Object state) +27
MCU.MvcApplication.Application_Start() +10


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.1


web.config文件
<?xml version="1.0" encoding="utf-8"?>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="DataSourceType" value="SqlServer" />
<add key="HostName" value="localhost" />
<add key="HttpsPort" value="443" />
<add key="webpages:Version" value="3.0.0.0" />
<add key="Data" value="MCUData" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime />
</system.web>
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.;Initial Catalog=MCU;User ID=xxxx;Password=123asaqww" />
</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

</configuration>
...全文
779 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ssdfa 2016-06-21
  • 打赏
  • 举报
回复
大家解决了没?
asdfewfdscvxv 2016-01-07
  • 打赏
  • 举报
回复
我也碰见这个问题,求解~~

111,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧