New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

web.config setting for Development

Return to previous page

  • 4/7/2015



web.config setting for Development

Last updated long time ago



(Enter the content of this article below)



Optimze web.config compilation setting for development

A setting for the web.config that saves time during development. The original line reads:

<compilation debug="true" strict="false">

Change it to

<compilation debug="true" strict="false" optimizeCompilations="true">

How does this help you?

A copy from MSDN documentation: “By default, when any change is made to a top-level file in a Web site, the whole site is recompiled. Top-level files include the global.asax file and all files in the bin and App_Code folders. It is safest to recompile everything when one of these files changes because other files in the site, such as .aspx and .ascx files, may reference the objects created by code in top-level files.”

The DNN bin folder contains a lot of (large) DLL’s and also supports dynamic compilation. So whenever you copy (build) the DLL into the bin folder as a result of your module development, your whole development site will recompile, taking several seconds, if not up to more than a minute or so. Adding the switch prevents this, only the affected files will be recompiled. And this can be no file at all, since you only placed your newly compiled DLL into the bin folder.

How much does it help?

Experimenting showed that a site refresh after a rebuild of a module can go down from 20-30 second or more to less than 2 seconds, sometimes even less than 1 second. If you ever want a full recompile, just change the setting to “false” for one time, and since your web.config is touched by this edit, the full recompile will occur directly at the next site refresh.

If you get an error after modifying web.config

If you get an ASP.NET "yellow screen of death" error stating "unrecognised attribute" modifying web.config, this indicates there is an update to the .NET Framework that you need to install on the web server first. See the Resolution section of the following article:
No sections defined
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out