Web.config 2.8 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.Optimization"/>
  17. <add namespace="System.Web.Routing" />
  18. </namespaces>
  19. </pages>
  20. </system.web.webPages.razor>
  21. <appSettings>
  22. <add key="webpages:Enabled" value="false" />
  23. </appSettings>
  24. <system.web>
  25. <httpHandlers>
  26. <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
  27. </httpHandlers>
  28. <!--
  29. 在视图页面中启用请求验证将导致验证在
  30. 控制器已对输入进行处理后发生。默认情况下,
  31. MVC 在控制器处理输入前执行请求验证。
  32. 若要更改此行为,请对控制器或操作
  33. 应用 ValidateInputAttribute。
  34. -->
  35. <pages
  36. validateRequest="false"
  37. pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
  38. pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
  39. userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  40. <controls>
  41. <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
  42. </controls>
  43. </pages>
  44. </system.web>
  45. <system.webServer>
  46. <validation validateIntegratedModeConfiguration="false" />
  47. <handlers>
  48. <remove name="BlockViewHandler"/>
  49. <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
  50. </handlers>
  51. </system.webServer>
  52. </configuration>