Top Banner
“Understanding our IIS - Part2”
19
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Understanding iis part2

“Understanding our IIS - Part2”

Page 2: Understanding iis part2

IIS 6.0 Isolation Mode

Page 3: Understanding iis part2

Why IIS7.0 ?• Http.Sys – listens HTTP request but we need

more Protocol Listeners for WCF services • WWW Publishing Service = Dividing Roles b/w

WWW service + Windows Process Activation Service (WAS)

• Instead of keeping the majority of functionality within the server itself, IIS include a Web server engine in which you can add or remove components, called modules, depending on your needs.

• Security & Simple Administration

Page 4: Understanding iis part2

IIS7.0 Components• Kernel Mode

– HTTP.sys• User Mode

– WWW Service– Windows Process Activation

Service(WAS)– Modules (Native & managed)– Application Pools (Integrated & Classic)

Request Processing in IIS7.0

Page 5: Understanding iis part2

Remember This

Page 6: Understanding iis part2

HTTP.sys• Also known as “HTTP Protocol Stack” or

“Http Listener Process”• Implemented as a kernel-mode device driver• Core component to receive and serve HTTP

requests and passing them off to the worker processes

• When you create a Web site, IIS registers the site with HTTP.sys

• Other than retrieving a stored response from its internal cache, HTTP.sys does not process the requests that it receives.

• Uses kernel mode request queue.

Page 7: Understanding iis part2

WWW Service• Also known as “World Wide Web

Publishing Service” + WAS• It manages the IIS metabase,• It is primarily responsible for

configuring HTTP.sys, updating it when configuration changes, and notifying WAS when a request queues.

• Additionaly collects the counters for Web Sites.

Page 8: Understanding iis part2

WAS Manages app pool and worker

processes. WAS reads config info from

ApplicationHost.config and passes the info to listener adapters on the server.

Any change in this config will be passed to listener adapters which is a channel b/w WAS and HTTP.sys

WAS majorly performs the WWW service tasks.

Page 9: Understanding iis part2

Modules Instead of keeping the majority of

functionality within the server itself, IIS include a Web server engine in which you can add or remove components, called modules, depending on your needs.

Modules are individual features that the server uses to process requests.

Provides customization and simplifies administration.

Page 10: Understanding iis part2

Native Modules HTTP Modules – redirect requests,

return HTTP errors etc. Security Modules – Authentication &

Authorization etc. Content Modules – Setting default

page, serving static content etc. Compression & Caching Modules Logging & Diagnostics Modules There are system level dlls for each

of the specific modules in IIS7.0

Page 11: Understanding iis part2

Managed Modules In addition to native modules, IIS

enables you to use managed code modules to extend IIS functionality.

Managed modules depend on the ManagedEngine module.

AnonymousIdentificationModule DefaultAuthentication FileAuthorization/FormsAuthentication WindowsAuthentication

Page 12: Understanding iis part2

Application Pools• Group of Web Applications and Web Sites are

called Application Pools• Every application within an application pool

shares the same worker process• The worker process(w3wp.exe) that services

one application pool is separated from the worker process that services another

• Integrated mode and Classic mode are set at the application pool level, which enables you to run applications simultaneously in application pools with different process modes on the same server.

Page 13: Understanding iis part2

Integrated App Pool Mode When a worker process in an

application pool receives a request, the request passes through an ordered list of events.

Each event calls the necessary native and managed modules to process portions of the request and to generate the response.

The request-processing models of IIS and ASP.NET are integrated into a unified process model.

Page 14: Understanding iis part2

Classic App Pool Mode When an application pool is in

Classic mode, IIS 7 and above handles requests in the same way as in IIS 6.0 worker process isolation mode.

This separation of the IIS and ASP.NET request-processing models results in duplication of some processing steps, like authentication and authorization.

Managed code features, such as Forms authentication, are only available to ASP.NET applications (aspnet_isapi.dll)

Page 15: Understanding iis part2

Again Remember This

Page 16: Understanding iis part2

Request Processing When a client browser initiates an HTTP

request for a resource on the Web server, HTTP.sys intercepts the request.

HTTP.sys contacts WAS to obtain information from the config. store.

WAS requests config. info from the applicationHost.config.

WWW Service receives config info, such as application pool and site configuration.

Page 17: Understanding iis part2

Request Processing WWW Service uses the configuration

information to configure HTTP.sys. WAS starts a worker process for the

application pool to which the request was made.

The worker process processes the request and returns a response to HTTP.sys.

The client receives a response.

Page 18: Understanding iis part2
Page 19: Understanding iis part2