B.Architecture

Core Components

      1. IIS : It provides hosting for ASP.Net run time

    1. HTTP Module : Implements most of the core logic of asp.net like page processing and authentication. They are like plugin and can be interchange with custom one

    2. HTTP Handlers: Handlers are pipeline end points and actually used to generate the output that browser consumes for example rendered page.

Processing Pipelines

Life Cycles

Application Life Cycles

ASP.Net Application Life cycle is bit different on IIS7 as compared to IIS6 and IIS5. IIS 7 provides integrated pipeline i.e. ASP.Net pipeline is native to IIS. Here is life cycle master chart http://static.devio.at/aspnet4-lifecycle2.png

  1. IIS7 Life Cycle

Page Life Cycles

Page life cycle is integrated quite a bit with application life cycle that start once Application object has been constructed. Here there is code project article that explins it very well. http://www.codeproject.com/Articles/73728/ASP-NET-Application-and-Page-Life-Cycle. Further reference can be found at http://msdn.microsoft.com/en-us/library/ms178472.aspx

State Management

Session management is a quite waste topic in ASP.Net.Prime state management objects are

  1. View state

  2. Control state

  3. Hidden fields

  4. Cookies

  5. Query strings

  6. Application state

  7. Session state

  8. Profile Properties

Here a Code Project article and MSDN reference that provides a comprehensive coverage.

  1. http://www.codeproject.com/Articles/492397/State-Management-in-ASP-NET-Introduction

  2. http://msdn.microsoft.com/en-us/library/75x4ha6s.ASPX

IIS Integration

    1. ASP.Net + IIS5

      1. In IIS 5 hosts aspnet_isapi.dll directly in the inetinfo.exe process or one of its isolated worker processes if you have isolation set to medium or high for the Web or virtual directory.

      2. When the first ASP.NET request comes in the DLL will spawn a new process in another EXE –aspnet_wp.exe – and route processing to this spawned process. This process in turn loads and hosts the .NET runtime.

      3. Every request that comes into the ISAPI DLL then routes to this worker process via Named Pipe calls. http://www.west-wind.com/presentations/howaspnetworks/howaspnetworks.asp

    2. ASP.Net + IIS6

      1. Instead of ISAPI extensions IIS 6 always creates a separate worker process – an Application Pool – and all processing occurs inside of this process, including execution of the ISAPI dll. Best advantage of App Pool wast automatic recycling. That added great improvement in application availability.

        1. Because Application Pools are external executable these executable can also be easily monitored and managed.

      2. In IIS 6, ISAPI extensions run in the Application Pool worker process. The .NET Runtime also runs in this same process, so communication between the ISAPI extension and the .NET runtime happens in-process which is inherently more efficient than the named pipe interface that IIS 5 must use.

      3. Although IIS 6 application pools are separate EXEs, they are highly optimized for HTTP operations by directly communicating with a kernel mode HTTP.SYS driver. http://www.west-wind.com/presentations/howaspnetworks/howaspnetworks.asp

    1. ASP.Net + IIS7

  1. Specific Considerations

    1. ASP.Net Web Form Vs MVC :

        1. It has been a long debate and there is no simple answer. Initially MVC was supposed to be a mobile development architecture but now days client side programming is dominating and in- fact Microsoft is also modifying it`s MVC infrastructure to accommodate more and more client side libraries and apis.http://www.codeproject.com/Articles/528117/WebForms-vs-MVC

        2. In short if same web page need to be rendered on both desktop and all types of mobile platform ASP.Net webfrom with adaptive rendering is a good choice otherwise MVC is next choice.