Эх сурвалжийг харах

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 жил өмнө
parent
commit
39905d10d6

+ 5 - 0
aspnet/src/Web.config

@@ -25,6 +25,11 @@
       <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql, Version=2.0.12.0"/>
       <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql, Version=2.0.12.0"/>
     </providers>
     </providers>
   </entityFramework>
   </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>
   <system.web>
     <!-- Remove X-AspNet-Version HTTP response header -->
     <!-- Remove X-AspNet-Version HTTP response header -->
     <httpRuntime enableVersionHeader="false" />
     <httpRuntime enableVersionHeader="false" />