TraceSection.RequestLimit Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta un valore che indica il numero massimo di richieste all'applicazione per cui ASP.NET archivia le informazioni di traccia.
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 seguente viene illustrato come utilizzare la RequestLimit proprietà . Questo esempio di codice fa parte di un esempio più ampio 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 richieste è 10.000. Se viene specificato un valore maggiore di 10.000, viene arrotondato automaticamente 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 e MostRecent è false, nel log di traccia non vengono archiviate altre richieste. Se MostRecent è true, le richieste più recenti vengono archiviate fino al limite imposto da questa impostazione e le richieste precedenti vengono eliminate.