Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How might one turn off precompilation in IIS?

I'm trying to avoid having compile errors block the whole ASP site while we are in development. That is, I want each page to compile on first run instead of the whole site so that compile errors do not show up globally. That can be danged annoying when a dev takes off for lunch after saving with a systnax bleherror.

I've tried adding this to ye olde web config (changed from default "Always"):

<pages compilationMode="Auto" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"> 

This did not have the desired effect. What can I change in the webconfig or using IIS to disable precompilation?

like image 604
FlavorScape Avatar asked Apr 26 '12 01:04

FlavorScape


People also ask

What ASP NET deployment method is used to Precompile website content before installation?

You can precompile a Web site using the Aspnet_compiler.exe tool on the command line. For more information, see How to: Precompile ASP.NET Web Sites for Deployment and ASP.NET Compilation Tool (Aspnet_compiler.exe). Visual Studio also includes commands to precompile a Web site from the IDE.

What is Precompiledapp config?

It's used to indicate whether or not the ASPX/ASCX pages in your site are updateable or not.

Does ASPX need to be compiled?

aspx. cs file) must first be compiled. This compilation can happen explicitly or automatically. If the compilation happens explicitly then the entire application's source code is compiled into one or more assemblies ( .


1 Answers

Web.config

<compilation batch="false" />

Indicates whether batching is supported. If True, eliminates the delay caused by the compilation required when you access a file for the first time. When this attribute is set to True, ASP.NET precompiles all the uncompiled files in a batch mode, which causes an even longer delay the first time the files are compiled. However, after this initial delay, the compilation delay is eliminated on subsequent access of the file. The default is True.

https://msdn.microsoft.com/library/s10awwz0.aspx

In IIS 7

To Use the UI Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7).

In Features View, double-click .NET Compilation.

On the .NET Compilation page, edit settings as necessary.

When finished, click Apply in the Actions pane.

http://technet.microsoft.com/en-us/library/cc725812(v=ws.10).aspx

like image 68
msigman Avatar answered Oct 15 '22 23:10

msigman