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.
Yes, I ran aspnet_regiis -i
No, it's still not working
I tried reinstalling .net 4 too, still nothing.
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?
Try setting runAllManagedModulesForAllRequests="true"
:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With