403.14误差IIS7和MVC 2已经尝试了一切建议修复 [英] 403.14 error with IIS7 and MVC 2 Already tried everything else suggested to fix

查看:143
本文介绍了403.14误差IIS7和MVC 2已经尝试了一切建议修复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MVC 2项目的ASP.Net 4框架。我试图将其设置在IIS7和它给了我一个403.14错误。

MVC 2 project on the ASP.Net 4 framework. I'm trying to set it up on IIS7 and it's giving me a 403.14 error.

是的,我尝试了微软补丁,这是有利的目录浏览和完全的什么,我想要它做错误的事情。

Yes, I tried the microsoft fix, which is enabling directory browsing and is completely the wrong thing of what I want it to do.

是的,我跑为aspnet_regiis -i

Yes, I ran aspnet_regiis -i

没有,这是仍然没有工作。

No, it's still not working

我尝试重新安装.NET 4中也是如此,仍然一无所获。

I tried reinstalling .net 4 too, still nothing.

我有轻微的怀疑这可能是一些在网站本身的其他.NET项目将在同一个IIS上运行。我唯一能想到的事情是,它是我的config文件,我将在下面粘贴:

I have a slight suspicion that it may be something in the site itself as other .Net projects will run on the same IIS. Only thing I can think of is that it's my .config file, which I will paste below:

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=152368
  -->
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
  </configSections>
  <appSettings configSource="AppSettings.config"/>

  <connectionStrings configSource="ConnectionStrings.config" />
  <system.net>
    <mailSettings>
      <smtp configSource="Smtp.config" />
    </mailSettings>
  </system.net>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>
    <authentication mode="Forms">
      <forms loginUrl="~/Security/AccessDenied" timeout="2880" />
    </authentication>
    <roleManager enabled="true" cacheRolesInCookie="false" defaultProvider="RoleProvider">
      <providers>
        <clear />
        <add name="RoleProvider" type="Boeing.Gls.Lpm.Web.Providers.LpmRoleProvider" />
      </providers>
    </roleManager>
    <customErrors mode="Off" defaultRedirect="Error.aspx">
      <error statusCode="404" redirect="Lpm/NotFound" />
    </customErrors>
    <pages>
      <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="Boeing.Gls.Lpm.Web.Models" />
        <add namespace="Boeing.Gls.Lpm.Domain.DataContracts" />
      </namespaces>
    </pages>
    <httpRuntime requestValidationMode="2.0" />
  </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="false" />
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <log4net debug="false">
    <!-- Define some output appenders -->
    <appender name="trace" type="log4net.Appender.TraceAppender, log4net">
      <layout type="log4net.Layout.PatternLayout,log4net">
        <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
      </layout>
    </appender>
    <appender name="console" type="log4net.Appender.ConsoleAppender, log4net">
      <layout type="log4net.Layout.PatternLayout,log4net">
        <param name="ConversionPattern" value="%d [%t] [BemsId : %property{bemsid}] %-5p %c - %m%n" />
      </layout>
    </appender>
    <appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net">
      <param name="File" value="App_Data/Log.txt" />
      <param name="AppendToFile" value="true" />
      <param name="RollingStyle" value="Date" />
      <param name="DatePattern" value="yyyy.MM.dd" />
      <param name="StaticLogFileName" value="true" />
      <layout type="log4net.Layout.PatternLayout,log4net">
        <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
      </layout>
    </appender>
    <logger name="NHibernate">
      <level value="ERROR" />
    </logger>
    <root>
      <priority value="DEBUG" />
      <appender-ref ref="rollingFile" />
    </root>
  </log4net>
</configuration>



任何想法?

Any ideas?

推荐答案

尝试设置 runAllManagedModulesForAllRequests =真正的

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>

这篇关于403.14误差IIS7和MVC 2已经尝试了一切建议修复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆