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.

 

 



















本文转自cnn23711151CTO博客,原文链接:http://blog.51cto.com/cnn237111/544885 ,如需转载请自行联系原作者



相关文章
|
10月前
|
前端开发 JavaScript
使用Element-UI中的el-upload实现文件的上传demo(亲测有用)
使用Element-UI中的el-upload实现文件的上传demo(亲测有用)
|
8月前
|
JavaScript
VUE上传功能本地上传正常,打包上传后报错TypeError: ***.upload.addEventListener is not a function
VUE上传功能本地上传正常,打包上传后报错TypeError: ***.upload.addEventListener is not a function
251 0
|
13天前
|
JavaScript 前端开发
Element_文件上传&&多个文件上传
Element_文件上传&&多个文件上传
|
前端开发 JavaScript
Bootstrap File Input,最好用的文件上传组件(1)
Bootstrap File Input,最好用的文件上传组件
528 0
Bootstrap File Input,最好用的文件上传组件(1)
|
8天前
|
JavaScript
node.js 删除某个目录下所有的文件夹
node.js 删除某个目录下所有的文件夹
11 0
|
4月前
|
Java Spring
Log4j中配置文件自动加载原理及非SRC下使用
Log4j中配置文件自动加载原理及非SRC下使用
41 0
|
4月前
|
小程序 应用服务中间件 Shell
laravel8(三)文件上传提示 “The file deos not exits ” ,但确实已经上传了文件
Laravel 文件上传提示 “The file "" deos not exits ” ,但确实已经上传了文件
36 1
|
9月前
|
JavaScript
文件上传限制以及element 和 element accept上传使用
前言 大家好,今天和大家分享一下上传文件如何实现上传限制,在制作项目时会遇见需要上传文件的功能,比如上传图片,上传音频,上传视频等等。但是点击上传文件打开文件夹时,文件夹内有好多格式的图片或音频,这个时候为了方便就可以进行文件格式的限制,只显示要上传的文件类型,下面我们来看看如何实现这个功能。
element使用el-upload组件实现自定义方法上传图片或者文件(配有详细注释)
element使用el-upload组件实现自定义方法上传图片或者文件(配有详细注释)
341 1
element使用el-upload组件实现自定义方法上传图片或者文件(配有详细注释)
syberh:未检测到已安装的target,请先安装target/找不到项目配置文件project.config.json,请确定当前目录是Syberh项目根目录!
syberh:未检测到已安装的target,请先安装target/找不到项目配置文件project.config.json,请确定当前目录是Syberh项目根目录!
172 0