소스 검색

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 년 전
부모
커밋
39905d10d6
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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" />