开发者

<compilation debug="XXX in web config, what scenarios does it affect?

If I've built my application in release mode, and precompiled the aspxs, what does

<compilation debug="true" />

do in the Web.config?

Do I still need to set this to false for production code?

Under开发者_开发百科 what circumstances does this have any affect?

Thanks


See this blog post from ScottGu which covers the intricacies of the debug switch and includes some discussion of precompiled sites.


Of course ! If you don't need to debug, don't deploy application with <compilation debug="true" />.

It affect ASP.NET resources (aspx, global.asax...) compilation mode and how the Framework will generate Temporary ASP.NET Files for your application.

Briefly, when debug is set to true, the Framework will compile each page into a separate assembly - Plus the compilation symbol etc... It also mean one assembly access for each page, and performance behaviors...

When debug is false, all pages will be compiled into one DLL (batch compilation).

EDIT: Damned, didn't realized you precompiled, sorry for the mistake.

In this case, it depend on your precompilation mode : deployment only or deployment and update.

But about your ASPX files, debug will have no effects.

deployment only : All files will be precompiled and debug will have no effects on them.

deployment and update : .asmx, .ashx, App_Themes, App_LocalResources will be "as is" and compiled on first access. Note that aspx can be updated in this mode.


You might have to, you might not.

If the server has in its machine.config then it forces all websites to run with debug = false.

Otherwise yes you need to disable it when you are launched. It will use less memory when you do.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜