Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.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
Asp.net mvc 4 未找到方法:';System.Reflection.MethodInfo System.Reflection.PropertyInfo.get_GetMethod()';_Asp.net Mvc 4_Razor_Deployment_Iis 7_Web Config - Fatal编程技术网

Asp.net mvc 4 未找到方法:';System.Reflection.MethodInfo System.Reflection.PropertyInfo.get_GetMethod()';

Asp.net mvc 4 未找到方法:';System.Reflection.MethodInfo System.Reflection.PropertyInfo.get_GetMethod()';,asp.net-mvc-4,razor,deployment,iis-7,web-config,Asp.net Mvc 4,Razor,Deployment,Iis 7,Web Config,我正在尝试在IIS 7.0中部署我的项目,我已经在IIS中完成了我所知道的一切,但仍然无法工作 这是错误消息页面。 这是我的网页配置 <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.Entity

我正在尝试在IIS 7.0中部署我的项目,我已经在IIS中完成了我所知道的一切,但仍然无法工作

这是错误消息页面。

这是我的网页配置

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <connectionStrings>
    <add name="ProjectConnStr" connectionString="Data Source="";Initial Catalog=ProjectName;User ID=username;Password=password;Persist Security Info=True;" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <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="ActiveDirectory" value="" />
    <add key="smtpClient" value="" />
    <add key="smtpUsername" value="" />
    <add key="smtpPassword" value="" />
    <add key="smtpSender" value="" />
  </appSettings>
  <system.web>
      <customErrors mode="Off" />
    <httpRuntime executionTimeout="9000" maxRequestLength="500000" />
    <authentication mode="None">
      <forms loginUrl="~/Account/Login" timeout="30" />
    </authentication>
  </system.web>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
        <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
      <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.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.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>
    </assemblyBinding>
  </runtime>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
    <system.webServer>
        <directoryBrowse enabled="true" />
        <defaultDocument>
            <files>
                <add value="index.cshtml" />
                <add value="Login.cshtml" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

我的项目的框架是4.5,我在IIS应用程序池中使用了.Net framework 4.0,管道是集成的

我搜索了很多文章,但在我的案例中没有一样。请帮助,我已经为此部署花费了2天时间


谢谢

在将一些新代码部署到新的web服务器时,我遇到了这个问题。结果表明,如果安装了ASP.NET,则web服务器的版本不正确。升级到v4.5.1后,一切正常

你找到解决方案了吗?是的,两天后我已经解决了这个问题,我忘记了我是怎么解决的,我能记得的是,我的IIS设置有问题,这不在web配置问题中。