Browse Source

Disable support for direct access of *.cshtml/*.vbhtml to improve perf

We don't need to access URLs like this because we use MVC and URL routing.

On my setup, this improves the performance of the 'json' test by 13%.
Malcolm Evershed 12 years ago
parent
commit
4b4a4bac93
1 changed files with 5 additions and 0 deletions
  1. 5 0
      aspnet/src/Web.config

+ 5 - 0
aspnet/src/Web.config

@@ -25,6 +25,11 @@
       <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql, Version=2.0.12.0"/>
     </providers>
   </entityFramework>
+  <appSettings>
+    <!-- Disable support for directly accessing *.cshtml/*.vbhtml files because that is a perf killer
+         and because we don't use such functionality. -->
+    <add key="webpages:Enabled" value="false" />
+  </appSettings>
   <system.web>
     <!-- Remove X-AspNet-Version HTTP response header -->
     <httpRuntime enableVersionHeader="false" />