如何关闭IIS中的预编译? [英] How might one turn off precompilation in IIS?

查看:318
本文介绍了如何关闭IIS中的预编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力避免编译错误在我们开发过程中阻止整个ASP站点。也就是说,我希望每个页面在首次运行时编译而不是整个站点,以便编译错误不会全局显示。当一个开发者在使用systnax bleherror保存后开始吃午饭时,这可能会很烦人。

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.

我已经尝试将此添加到你的web配置中(从默认情况下更改)始终):

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

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

这没有达到预期的效果。我可以在webconfig中更改或使用IIS禁用预编译?

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

推荐答案

Web.config



< compilation batch =false/>

指示批处理是否为支持的。
如果为True,则消除了首次访问文件时所需编译所导致的延迟。当此属性设置为True时,ASP.NET以批处理模式预编译所有未编译的文件,这会在第一次编译文件时导致更长的延迟。但是,在此初始延迟之后,在后续访问文件时消除了编译延迟。
默认值为True。

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

使用UI
打开IIS管理器并导航到要管理的级别。有关打开IIS管理器的信息,请参阅打开IIS管理器(IIS 7)。有关在UI中导航到位置的信息,请参阅IIS管理器中的导航(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).

在功能视图中,双击.NET编译。

In Features View, double-click .NET Compilation.

在.NET编译页面上,根据需要编辑设置。

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

这篇关于如何关闭IIS中的预编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆