IIS AND PAGE DIRECTIVES IN ASP

IIS-INTERNET INFORMATION SERVER:

·         Internet Information Server is one of the most powerful web servers provided by Microsoft that is able to host and run  web applications.
·         IIS supports the following protocols: FTP, FTPS, SMTP, NNTP, HTTP/HTTPS
·         IIS has two modes, Kernel and User.
·         Kernel Mode
      • HTTP.SYS
·         User Mode
      • Web Admin Service
      • Virtual Directory
      • Application Pool
HTTP.SYS is the heart of kernel mode which accepts raw requests from the client and passes it to a particular application pool.
·         The steps of IIS request processing.
1.      Client requests for a page from the browser by hitting the site URL.
2.      Request comes to kernel level. HTTP.SYS catches the requests and creates a separate queue for each and every application pool.
3.      A request coming to the application pool means the worker process (w3wp.exe) starts action by loading the ISAPI Filter.
4.      Based on the requested resource, w3wp.exe loads "aspnet_isapi.dll" for an APSX page and starts an HTTPRuntime which is the entry point of an application.
5.      Then the HttpRuntime. ProcessRequest method signals the start of processing.
6.      The HttpContext object represents the context of the currently active request, as it contains references to objects you can access during the request lifetime, such as Request, Response, Application, Server, and Cache.
7.      The HttpRuntime creates a pool of HttpApplication objects.
8.      The request passes through the HTTP Pipeline.
9.      HTTP Modules are executed against the request until the request hits the ASP.NET page HTTP Handler.
10.  Once the request leaves the HTTP Pipeline, the Page life cycle starts.

Page directives:
ASP.NET directives are instructions to specify optional settings, such as registering a custom control and page language. These settings describe how the web forms (.aspx) or user controls (.ascx) pages are processed by the .Net framework.
The syntax for declaring a directive is:
<%@directive name attribute=value [attribute=value]%>
Page Directive:
The Page directive defines the attributes specific to the page file for the page parser and the compiler.
The basic syntax of Page directive is:
<%@ Page Language =C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” Trace=”true”%>
The attributes of the Page directive are:
Attributes
Description

AutoEventWireup
The Boolean value that enables or disables page events that are being automatically bound to                  methods; for example, Page_Load.

Buffer
The Boolean value that enables or disables HTTP response buffering.
ClassName
The class name for the page.
ClientTarget
The browser for which the server controls should render content.
CodeFile
The name of the code behind file.
Debug
The Boolean value that enables or disables compilation with debug symbols.
Description
The text description of the page, ignored by the parser.
EnableSessionState
It enables, disables, or makes session state read-only.


No comments:

Post a Comment