IIS回收配置“清除”标签含义 [英] IIS recycling configuration "clear" tag meaning

查看:132
本文介绍了IIS回收配置“清除”标签含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个工具来为IIS服务器中的应用程序池配置回收功能。根据我的理解,此配置存储在配置文件applicationHost.config中,如下所示

I'm working on a tool to configure the recycling feature for an application pool in IIS Server. From my understanding, this configuration is stored in the configuration file "applicationHost.config", which is as below

    <applicationPools>
        <add name="TestPool" autoStart="true" managedRuntimeVersion="v4.0">
            <recycling>
                <periodicRestart time="00:00:00">
                    <schedule>
                        <clear />
                        <add value="20:00:00" />
                    </schedule>
                </periodicRestart>
            </recycling>
        </add>
    </applicationPools>

我的目标是使用命令行工具清除并向回收计划添加新值。到目前为止,我已经能够完全删除时间表。但是,当我尝试添加新的回收时间值时,我无法添加清除标记。这个标签是什么意思?应用程序池是否可以在没有此标记的情况下正常运行?

My goals are to clear and add new value to the recycle schedule using Command line tool. So far I have been able to completely remove the schedule. However, when I try to add new recycle time value, I can not add the "clear" tag. What is this tag meaning? Can the application pool operate normally without this tag?

推荐答案

根据 Microsoft文档


< clear> 元素会删除先前在当前配置文件中或在配置文件层次结构中更高级别定义的应用程序中的所有部分和部分组。

The <clear> element removes all sections and section groups from your application that were defined earlier in the current configuration file or at a higher level in the configuration file hierarchy.

在你的情况下,可以删除元素,但我会建议你保留它以避免任何特殊情况。

In your case, it's ok to remove the element, but I will suggest you to keep it there for avoiding any exceptional circumstances.

这篇关于IIS回收配置“清除”标签含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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