in precompiled asp.net website - Does it matter?

前端 未结 3 1823
灰色年华
灰色年华 2021-02-05 14:03

I\'m deploying a precompiled and all-page-merged website using Web Deployment Projects on Visual Studio 2008. Note that all assemblies and projects have been compiled in Release

3条回答
  •  你的背包
    2021-02-05 14:49

    According to the documentation:

    Specifies whether to compile debug binaries rather than retail binaries

    However, having just quickly reflected through System.Web, I can see the debug flag is used (directly or indirectly) by the following:

    • Runtime compilation (ASPX/ASCX/MASTER)
    • Code generation of the browser capabilities files
    • HttpDebugHandler, which is used during a debugging session

    As a result, if your site is precompiled you will not receive a performance hit. However, as the HttpApplication will respond to the DEBUG http verb, you open yourself up to security problems.

    In short, set debug=false, even if your site is precompiled.

    Edit: debug=true will result in a performance (see Mehmet Aras's answer) hit for caching and no execution timeout, but it will not reduce execution speed for compiled pages.

提交回复
热议问题