'/'应用程序配置错误中的服务器错误

时间:2017-01-12 09:29:23

标签: c# iis iis-7 web-config

根据图片我在web.config文件中检查过的错误以及我在其中所做的更改问题仍然存在。

<system.web>
  <customErrors mode="Off"/>
  <trust level="Full" />
<compilation debug="true" targetFramework="4.0"/>
  <authentication mode="Forms">
      <forms name="APPXAUTH1" loginUrl="~/Home/UserLogin" protection="All" timeout="990"/>
  </authentication>
  <authorization>
      <allow users="*"/>
  </authorization>
  <httpRuntime relaxedUrlToFileSystemMapping="true" />

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/>
    <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.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="1.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.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.0.0" newVersion="5.2.0.0"/>
  </dependentAssembly>
</assemblyBinding>

<location allowOverride="true">
</location>
<location path="Admin">
    <system.web>
        <authorization>
            <allow roles="Admin"/>
            <deny users="*"/>
        </authorization>
    </system.web>
</location>

如上所述我在我的web.config文件中使用了这个,即使我删除了位置allowOverride =“true”或此代码 httpRuntime relaxedUrlToFileSystemMapping =“true”问题我将使用的项目是MVC 4.5.1

网站错误是 website error

0 个答案:

没有答案