Share via


TraceSection.RequestLimit Proprietà

Definizione

Ottiene o imposta un valore che indica il numero massimo di richieste per l'applicazione per le quali vengono archiviate informazioni di traccia tramite ASP.NET.

public:
 property int RequestLimit { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("requestLimit", DefaultValue=10)]
[System.Configuration.IntegerValidator(MinValue=0)]
public int RequestLimit { get; set; }
[<System.Configuration.ConfigurationProperty("requestLimit", DefaultValue=10)>]
[<System.Configuration.IntegerValidator(MinValue=0)>]
member this.RequestLimit : int with get, set
Public Property RequestLimit As Integer

Valore della proprietà

Numero massimo di richieste da archiviare nel server. Il valore predefinito è 10.

Attributi

Esempio

Nell'esempio di codice riportato di seguito viene illustrato come utilizzare la proprietà RequestLimit. Questo esempio di codice fa parte di un esempio più grande fornito per la TraceSection classe.


// Get the current RequestLimit property value.
Int32 requestLimitValue = traceSection.RequestLimit;

// Set the RequestLimit property to 256.
traceSection.RequestLimit = 256;

' Get the current RequestLimit property value.
Dim requestLimitValue As Int32 = traceSection.RequestLimit

' Set the RequestLimit property to 256.
traceSection.RequestLimit = 256

Commenti

Il limite massimo di richiesta è 10.000. Se viene specificato un valore maggiore di 10.000, viene arrotondato in modo silenzioso a 10.000 per ASP.NET.

La MostRecent proprietà ottiene o imposta un valore che determina se le richieste archiviate nel server sono le richieste più recenti o le prime richieste da ottenere.

Nota Quando il numero di richieste supera il limite imposto da questa impostazione ed MostRecent è false, non vengono archiviate più richieste nel log di traccia. Se MostRecent è true, le richieste più recenti vengono archiviate fino al limite imposto da questa impostazione e le richieste precedenti vengono rimosse.

Si applica a

Vedi anche