TraceSection.MostRecent 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示是否始终将最新请求存储在服务器上。
public:
property bool MostRecent { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("mostRecent", DefaultValue=false)]
public bool MostRecent { get; set; }
[<System.Configuration.ConfigurationProperty("mostRecent", DefaultValue=false)>]
member this.MostRecent : bool with get, set
Public Property MostRecent As Boolean
属性值
true 如果最新请求始终存储在跟踪日志中,则为否则,为 false. 默认值为 false。
- 属性
示例
下面的代码示例演示如何使用该 MostRecent 属性。 该代码示例是 TraceSection 类中的一个较大示例的一部分。
// Get the current MostRecent property value.
Boolean mostRecentValue = traceSection.MostRecent;
// Set the MostRecent property to true.
traceSection.MostRecent = true;
' Get the current MostRecent property value.
Dim mostRecentValue As Boolean = traceSection.MostRecent
' Set the MostRecent property to true.
traceSection.MostRecent = True
注解
请求以到达的顺序存储在跟踪日志中,最多存储属性中指定的 RequestLimit 请求数。 达到请求限制且MostRecenttrue已达到,旧请求会自动丢弃,新请求将继续添加到日志中。 达到请求限制且MostRecentfalse已丢弃新请求,直到从日志中删除早期请求或请求限制增加为止。