Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
4b4a4bac93
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  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" />