- root web.config removes all handlers and makes all paths a 404, except default.asp to support "/".

- content directories no opt-in to static files only.
- module web.configs no longer need to explicitly exclude cshtml, etc, paths.

--HG--
branch : dev
This commit is contained in:
dareed
2010-11-02 18:12:44 -07:00
parent dee8955019
commit f0968a0c71
93 changed files with 877 additions and 159 deletions

View File

@@ -104,12 +104,13 @@
<add namespace="Orchard.Mvc.Html"/>
</namespaces>
</pages>
<httpHandlers>
<add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<!-- Block access to module and theme definition files -->
<add verb="*" path="module.txt" validate="false" type="System.Web.HttpNotFoundHandler" />
<add verb="*" path="theme.txt" validate="false" type="System.Web.HttpNotFoundHandler" />
<!-- see below -->
<clear />
<add path="default.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" validate="true" />
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>
</system.web>
<!--
@@ -117,17 +118,15 @@
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true">
</modules>
<handlers>
<remove name="MvcHttpHandler"/>
<remove name="UrlRoutingHandler"/>
<add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<!-- Block access to module and theme definition files -->
<add name="moduleHttpNotFoundHandler" preCondition="integratedMode" verb="*" path="module.txt" type="System.Web.HttpNotFoundHandler" />
<add name="themeHttpNotFoundHandler" preCondition="integratedMode" verb="*" path="theme.txt" type="System.Web.HttpNotFoundHandler" />
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" />
<handlers accessPolicy="Script">
<!-- clear all handlers, prevents executing code file extensions, prevents returning any file contents -->
<clear/>
<!-- Return 404 for all requests via managed handler. The url routing handler will substitute the mvc request handler when routes match. -->
<add name="Default" path="default.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode" requireAccess="Script"/>
<add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script"/>
</handlers>
</system.webServer>
<runtime>