httpRuntime Element。配置文件上传限制等

 

httpRuntime Element

configuration Element (General Settings Schema)
  system.web Element (ASP.NET Settings Schema)
    httpRuntime Element (ASP.NET Settings Schema)

 
Attributes
 

Attribute

Description

apartmentThreading

Optional Boolean attribute.

Enables apartment threading for classic ASP compatibility.

This attribute is new in the .NET Framework version 2.0. The default is False.

appRequestQueueLimit

Optional Int32 attribute.

Specifies the maximum number of requests that ASP.NET queues for the application. When there are not enough free threads to process a request, the requests are queued. Incoming requests are rejected with the error "503 - Server Too Busy" when the queue exceeds the limit that is specified in this attribute.

The default is 5000.

NoteNote
For the .NET Framework versions 1.0 and 1.1, the default is 100.

delayNotificationTimeout

Optional Int32 attribute.

Specifies the time-out in seconds for delaying notifications.

This attribute is new in the .NET Framework version 2.0.

The default is 5 seconds.

encoderType

Gets or sets the name of a custom type that can be used to handle HTML and URL encoding.

ASP.NET uses the HttpEncoder type as the default handler for HTML and URL encoding tasks. To customize encoding behavior, you can create a class that inherits from the HttpEncoder type. In the configuration file for an application, you then set theEncoderType attribute of the httpRuntime element to the fully qualified string name of the custom type.

This attribute is new in the .NET Framework version 4.

Enable

Optional Boolean attribute.

Specifies whether the application domain (AppDomain) is enabled to accept incoming requests at the current-node and child-node level. If False, the application is effectively turned off.

The default is True.

enableHeaderChecking

Optional Boolean attribute.

Specifies whether ASP.NET should check the request header for potential injection attacks. If an attack is detected, ASP.NET responds with an error.

This attribute is new in the .NET Framework 2.0.

The default is True.

enableKernelOutputCache

Optional Boolean attribute.

Specifies whether output caching is enabled. This attribute is only relevant when Microsoft Internet Information Services (IIS) 6.0 or later is installed. The output caching configuration and type of request determines whether content can be cached.

To cache a response, the following criteria must be met:

  • Caching must be explicitly enabled by a page directive or by using the caching API.

  • Caching must have an expiration policy so that the kernel recognizes when to discard the response.

  • Caching does not have any variable headers or parameters.

  • Authentication is not required.

The default is True.

enableVersionHeader

Optional Boolean attribute.

Specifies whether ASP.NET should output a version header. This attribute is used by Microsoft Visual Studio 2005 to determine which version of ASP.NET is in use. It is not necessary for production sites and can be disabled.

NoteNote
This attribute is not available in the .NET Framework 1.0.

The default is True.

executionTimeout

Optional Int32 attribute.

Specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET.

This time-out applies only if the debug attribute in the compilation element is False. If the debug attribute is True, to help avoiding application shut-down while you are debugging, do not set this time-out to a large value.

The default is 110 seconds.

NoteNote
In the .NET Framework 1.0 and 1.1, the default is 90 seconds.

maxRequestLength

Optional Int32 attribute.

Specifies the limit for the input stream buffering threshold, in KB. This limit can be used to prevent denial of service attacks that are caused, for example, by users posting large files to the server.

The default is 4096 KB. If the threshold is exceeded, a ConfigurationErrorsException exception is thrown.

maxWaitChangeNotification

Optional Int32 attribute.

Specifies the maximum number of seconds to wait from the first file change notification before restarting the AppDomain for a new request. Set this attribute to a number that is greater than the length of time to complete any file copy processes. File change notifications are combined based on the value of this attribute and the waitChangeNotification attribute.

This attribute is new in the .NET Framework 2.0.

The default is 0.

minFreeThreads

Optional Int32 attribute.

Specifies the minimum number of free threads to allow execution of new requests. ASP.NET keeps the specified number of threads free for requests that require additional threads to complete processing.

The default is 8.

minLocalRequestFreeThreads

Optional Int32 attribute.

Specifies the minimum number of free threads that ASP.NET keeps available to allow execution of new local requests. The specified number of threads is reserved for requests that are coming from the local host, in case some requests issue child requests to the local host during processing. This helps to prevent a possible deadlock with recursive reentry into the Web server.

The default is 4.

requestValidationMode

Optional Int32 attribute.

Gets or sets a version number that indicates which ASP.NET version-specific approach to validation will be used.

The value that you assign to this property is not validated to match a specific version of ASP.NET. Any numeric value smaller than4.0 (for example, 3.72.9, or 2.0) is interpreted as 2.0. Any number larger than 4.0 is interpreted as 4.0

The default is 4.0.

requestValidationType

Optional String attribute.

Gets or sets the name of a type that is used to validate HTTP requests.

To customize ASP.NET request validation behavior, you can create a class that inherits from the RequestValidator type. In the configuration file for an application, you then set the requestValidationType attribute of the httpRuntime element to the fully qualified string name of the custom type

The default is the fully qualified name of the RequestValidator type that ASP.NET uses for validation

requestLengthDiskThreshold

Optional Int32 attribute.

Specifies the limit for the input stream buffering threshold, in kilobytes. This value should not exceed the maxRequestLengthattribute.

This attribute is new in the .NET Framework 2.0.

The default is 80 KB.

requireRootedSaveAsPath

Optional Boolean attribute.

Specifies whether the filename parameter in a SaveAs method must be an absolute path. The ASP.NET process must have permission to create files in the specified location.

This attribute is new in the .NET Framework 2.0.

The default is True.

sendCacheControlHeader

Optional Boolean attribute.

Specifies whether to send a cache control header, which is set to Private, by default. If True, client-side caching is disabled.

This attribute is new in the .NET Framework 2.0.

The default is True.

shutdownTimeout

Optional Int32 attribute.

Specifies the number of minutes that are allowed for the worker process to shut down. When the time-out expires, ASP.NET shuts down the worker process.

This attribute is new in the .NET Framework 2.0.

The default is 90 seconds.

useFullyQualifiedRedirectUrl

Optional Boolean attribute.

Specifies whether client-side redirects are fully qualified using the form "http://server/path", which is required for some mobile controls, or whether relative redirects are sent to the client instead. If True, all redirects that are not fully qualified are automatically converted to fully qualified form.

NoteNote
If this attribute is set to False, some browsers might encounter issues when loading pages that are in cookieless sessions.

The default is False.

waitChangeNotification

Optional Int32 attribute.

Specifies the time, in seconds, to wait for another file change notification before restarting the AppDomain. Set this attribute to a number that is greater than the time between the updates of two file copy change notifications. File change notifications are combined based on the value of this attribute and the maxWaitChangeNotification attribute.

This attribute is new in the .NET Framework 2.0.

The default is 0 seconds.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值