Web.config 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <configuration>
  3. <configSections>
  4. <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  5. <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
  6. <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
  7. </sectionGroup>
  8. </configSections>
  9. <system.web.webPages.razor>
  10. <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  11. <pages pageBaseType="System.Web.Mvc.WebViewPage">
  12. <namespaces>
  13. <add namespace="System.Web.Mvc" />
  14. <add namespace="System.Web.Mvc.Ajax" />
  15. <add namespace="System.Web.Mvc.Html" />
  16. <add namespace="System.Web.Routing" />
  17. </namespaces>
  18. </pages>
  19. </system.web.webPages.razor>
  20. <appSettings>
  21. <add key="webpages:Enabled" value="false" />
  22. </appSettings>
  23. <system.web>
  24. <httpHandlers>
  25. <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
  26. </httpHandlers>
  27. <!--
  28. 在视图页面中启用请求验证将导致验证在
  29. 控制器已对输入进行处理后发生。默认情况下,
  30. MVC 在控制器处理输入前执行请求验证。
  31. 若要更改此行为,请对控制器或操作
  32. 应用 ValidateInputAttribute。
  33. -->
  34. <pages
  35. validateRequest="false"
  36. pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
  37. pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
  38. userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  39. <controls>
  40. <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
  41. </controls>
  42. </pages>
  43. </system.web>
  44. <system.webServer>
  45. <validation validateIntegratedModeConfiguration="false" />
  46. <handlers>
  47. <remove name="BlockViewHandler"/>
  48. <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
  49. </handlers>
  50. </system.webServer>
  51. </configuration>