httpruntime and ASP. NET runtime and IIS processing model

Source: Internet
Author: User
Tags metabase

Configure the ASP. NET HTTP runtime settings to determine how requests to the ASP. NET application are handled, and the configuration section and its description are as follows.

executiontimeout=--------------------------Specifies the maximum number of seconds that a request is allowed to execute before it is automatically closed by ASP.

Maxrequestlength= "4096"-------------------------- Specifies the threshold limit for input stream buffering (in kilobytes ). This restriction can be used to prevent denial of service attacks, such as denial of service attacks that result from users sending large files to the server.

requestlengthdiskthreshold= the input stream buffering threshold limit (in bytes) for the "--------------------------". The value should not exceed the maxRequestLength property.

Usefullyqualifiedredirecturl= "false"

Minfreethreads= "8"-------------------------- minimum number of threads at idle when requested

Minlocalrequestfreethreads= "4"--------------------------the minimum number of idle threads for local requests

apprequestqueuelimit=-------------------------- Specifies the maximum number of requests that ASP. NET will queue for the application. When there are not enough free threads to process the request, the request is queued. When the queue exceeds the limit specified in this attribute, the incoming request is rejected through the "503- Server Too busy" error message.

Enablekerneloutputcache= "true"-------------------------- enable output caching IIS6 later version takes effect

Enableversionheader= "true"-------------------------- if the header output version

Requirerootedsaveaspath= "true"-------------------------- specifies whether the filename parameter in the SaveAs method must be an absolute path. the ASP . NET process must have permission to create files in the specified location.

Enable= "true"-------------------------- equivalent to shutting down the application (even static pages are inaccessible) specifies whether the application domain (AppDomain) is enabled at the current node and child node level . To accept the incoming request. If False, the application is actually closed

shutdowntimeout=-------------------------- off timeout unit seconds Specifies the number of minutes to allow the worker process to shut down. When this time-out is reached,ASP . NET shuts down the worker process.

delaynotificationtimeout= "5"-------------------------- delay notification time -out seconds

waitchangenotification= "0"-------------------------- pending Change Notification

maxwaitchangenotification= "0"-------------------------- maximum number of pending change notifications

Requestpriority= "Normal"-------------------------- request Policy

Enableheaderchecking= "true"-------------------------- enable head check to detect possible injection attacks. If an attack is detected,ASP . NET will return an error as a response.

Sendcachecontrolheader= "true"-------------------------- Specifies whether to send cache control headers that are set to Private by default. If true, client-side caching is disabled.

Apartmentthreading= "false"----------- Enable unit threading for Legacy ASP compatibility.

/>

from the above features, it probably sums up Httruntime 's own operational aspects (including restart time, number of threads control, request queue), request header limit response output.

While httpruntime also involves other aspects, such as the HTTP pipeline, the IIS run model. There are other posts from the code point of view to enumerate from the arrival of a request, in the AppDomain to create httpruntime,httpcontext,httpapplication, each HttpModule, to HttpHandler processing.

Deep Understanding of the long ASP The internal operating mechanism "

In addition to the previous look at the HTTP pipeline has not been carefully to understand the IIS processing model, this also complements. IIS to I now see the version of the 7.0, there is a lot of information on the Internet starting from 5.0, so that is the case from the 5.0 to see the changes.

Excerpt from Jing Jinnan's book, "ASP. NET MVC 4 Framework Revelation"

IIS5 Processing Model

IIS 5.x runs in process InetInfo.exe , a process hosted by a world Wide Web Publishing Service( w3svc) Windows Services. The main features of W3SVC include listening for HTTP requests, worker processes, and configuration management (by loading related configuration information from Metabase).

If we're asking for a ASP. NET . Aspx, . asmx and . svc Span style= "font-family: the song Body;" > ET, aspnet_isapi.dll will be loaded, and ASP. ASP. The worker process (if the process has not yet started). For IIS 5.x aspnet.exe IIS Named pipes

During the initialization of a worker process, the. NET Runtime ( CLR) is loaded to build a managed environment. For a Web app's initial request, the CLR creates an application domain for it ( application domain). In the application domain, the HTTP runtime ( HTTP runtime) is loaded and used to create the appropriate application. all Web apps hosted in IIS 5.x run in different application domains in the same process (worker process aspnet_wp.exe).

IIS6 Processing Model

There are two drawbacks in IIS5, one is that the ISAPI is separated from the work process, there is a performance bottleneck, and the other is that all ASP. NET applications exist in the same process, and there is an impact between applications.

Two improvements were made to these two issues, introducing the application pool and placing the ISAPI in the worker process.

In addition, HTTP. SYS is introduced at the system kernel level in IIS6 to listen to the request. The benefits are continuous monitoring, better stability and data caching in kernel mode. Inetinfo.exe is purely used to store ISAPI configuration information, W3SVC is hosted in another process SvcHost.exe, and its internal functions have not changed, and functional implementation has been improved.

IIS7 Processing Model

The introduction of the IIS7 The introduction of the Windows Process Activation Service (Windows Processes Activation Services , was ) will be original ( IIS 6.0) w3svc Some of the functions that were hosted were diverted to was . is actually opening up an extensible interface to the monitoring session. W3SVC still stores the listener for the original HTTP request, but it is also the only responsibility for subsequent reads of the ISAPI information and the work process management that block was handed over to was. The extended listener interface is useful in terms of WCF, but it's not a concern for now. The configuration information for the ISAPI is also not dependent on the original metabase, and ApplicationHost.config is used instead.

IIS7 's integration model must also be mentioned, in the previous introduction of httphandlers also mentioned IIS7 have Classic mode and integration mode. Prior to IIS7, the HTTP request was processed using a dual pipeline, with a heap of module processing (such as authentication) in IIS, and repeated processing in the HTTP pipeline. With the addition of the integrated mode in IIS7, these two pipelines can be transformed into single-pipe unified processing. IIS7 also retains the dual-pipe processing mode, known as the Classic mode. The extended HttpModule and HttpHandler in Classic mode only work on those resources that the ISAPI has extended, but it has no effect on static resources, assuming that the integrated mode is used because it is a single pipeline unified processing, Both dynamic and static are handled by HttpModule and HttpHandler.

Several of the IIS processing models described above are in the range of. NET runtime before the httpruntime generation, and httpruntime is only beginning to be created. about how to be generated, how to be called I don't want to paste the code anymore. If you want to see it or the link: the Long "in- depth understanding of the Internal operating mechanism of ASP."

The above are the content of the text, in the peak of the elder brother after teaching I think this study is not practical, but it seems that there is no effective way to verify these claims. No content has been found on MSDN at least.

httpruntime and ASP. NET runtime and IIS processing model

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.