相关文章推荐
豪气的勺子  ·  Python 典藏篇-Microsoft ...·  1 年前    · 
威武的苦咖啡  ·  iOS ...·  1 年前    · 
玩足球的馒头  ·  Winforms问题 - ...·  1 年前    · 

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
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

Property Value

Examples

The following example shows how to obtain the current MaxRequestLength property value.

// 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

Remarks

The MaxRequestLength property specifies the limit for the buffering threshold of the input stream. For example, this limit can be used to prevent denial of service attacks that are caused by users who post large files to the server.

The value assigned to this property should be greater or equal to value assigned to the RequestLengthDiskThreshold property.