HttpRuntimeSection.DelayNotificationTimeout 属性

定义

获取或设置更改通知延迟。

public:
 property TimeSpan DelayNotificationTimeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))]
[System.Configuration.ConfigurationProperty("delayNotificationTimeout", DefaultValue="00:00:05")]
public TimeSpan DelayNotificationTimeout { get; set; }
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))]
[System.Configuration.ConfigurationProperty("delayNotificationTimeout", DefaultValue="00:00:00")]
public TimeSpan DelayNotificationTimeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))>]
[<System.Configuration.ConfigurationProperty("delayNotificationTimeout", DefaultValue="00:00:05")>]
member this.DelayNotificationTimeout : TimeSpan with get, set
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))>]
[<System.Configuration.ConfigurationProperty("delayNotificationTimeout", DefaultValue="00:00:00")>]
member this.DelayNotificationTimeout : TimeSpan with get, set
Public Property DelayNotificationTimeout As TimeSpan

属性值

指定更改通知延迟的时间(以秒为单位)。

属性

示例

以下示例演示如何使用该 DelayNotificationTimeout 属性。

// Get the DelayNotificationTimeout property value.
Response.Write("DelayNotificationTimeout: " +
  configSection.DelayNotificationTimeout.ToString() + "<br>");

// Set the DelayNotificationTimeout property value to 10 seconds.
configSection.DelayNotificationTimeout = TimeSpan.FromSeconds(10);
' Get the DelayNotificationTimeout property value.
Response.Write("DelayNotificationTimeout: " & _
  configSection.DelayNotificationTimeout.ToString() & "<br>")

' Set the DelayNotificationTimeout property value to 10 seconds.
configSection.DelayNotificationTimeout = TimeSpan.FromSeconds(10)

注解

通过设置 DelayNotificationTimeout 属性,可以解决某些防病毒应用程序在将信息写回到扫描的文件时引起的问题。

注释

之所以出现问题,是因为无法区分由防病毒扫描引起的文件更改与用户所做的更改。 最终结果是重新启动正在扫描其文件的应用程序。

适用于