C# Developeramp;#039;s Guide to ASP.NET, XML, and ADO.NET [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

C# Developeramp;#039;s Guide to ASP.NET, XML, and ADO.NET [Electronic resources] - نسخه متنی

Jeffrey P. McManus; Chris Kinsman

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








An Overview of ASP.NET Request Handling


To understand how HttpModules and HttpHandlers fit into the scheme of things, you have to understand the way that ASP.NET handles a request. When a request is received by Internet Information Server (IIS), it looks at the extension to determine which ISAPI filter should handle the request. For any of the supported file extensions, such as .aspx or .asmx, the answer is aspnet_isapi.dll. When ASP.NET fires up, it performs almost the same process again. It looks at the request and compares it to the <httpHandlers> section of the .config file. By default, machine.config maps .aspx files to the PageHandlerFactory and .asmx files to the WebServiceHandlerFactory. This mapping determines the HttpHandler (class) that is responsible for handling the request. With the concept of mapping, you can create a new HttpHandler and map it to a new type of request. In fact, this is exactly what Microsoft did with Trace.axd. You will find that it is a new HttpHandler that is registered in machine.config for any request path that ends in trace.axd.

While processing a request received from IIS, ASP.NET raises several events. They are raised in the following order:


BeginRequest


AuthenticateRequest


AuthorizeRequest


AcquireRequestState


ResolveRequestCache


Page Constructor


PreRequestHandlerExecute


Page.Init


Page.Load


PostRequestHandlerExecute


ReleaseRequestState


UpdateRequestCache


EndRequest


PreSendRequestHeaders


PreSendRequestContent



The items in bold represent several of the page-level events that are raised during the execution of a page. Each of these events can be sunk, providing opportunities to participate in the processing of each page in an application. In Chapter 7, "Security," we looked at handling the AuthenticateRequest and AuthorizeRequest events.


/ 106