HttpRuntimeSection.MaxRequestLength Eigenschap

Definitie

Hiermee haalt u de maximale aanvraaggrootte op of stelt u deze in.

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

Waarde van eigenschap

De maximale aanvraaggrootte in kilobytes. De standaardgrootte is 4096 KB (4 MB).

Kenmerken

Uitzonderingen

De geselecteerde waarde is kleiner dan RequestLengthDiskThreshold.

Voorbeelden

In het volgende voorbeeld ziet u hoe u de huidige MaxRequestLength eigenschapswaarde kunt verkrijgen.

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

// Set the MaxRequestLength property value to 2048 kilobytes.
configSection.MaxRequestLength = 2048;
' Get the MaxRequestLength property value.
Response.Write("MaxRequestLength: " & _
  configSection.MaxRequestLength & "<br>")

' Set the MaxRequestLength property value to 2048 kilobytes.
configSection.MaxRequestLength = 2048

Opmerkingen

De MaxRequestLength eigenschap geeft de limiet op voor de bufferdrempel van de invoerstroom. Deze limiet kan bijvoorbeeld worden gebruikt om Denial of Service-aanvallen te voorkomen die worden veroorzaakt door gebruikers die grote bestanden naar de server plaatsen.

De waarde die aan deze eigenschap is toegewezen, moet groter of gelijk zijn aan de waarde die aan de RequestLengthDiskThreshold eigenschap is toegewezen.

Van toepassing op