What is the difference between ‘classic’ and ‘integrated’ pipeline mode in IIS7?

Classic mode (the only mode in IIS6 and below) is a mode where IIS only works with ISAPI extensions and ISAPI filters directly. In fact, in this mode, ASP.NET is just an ISAPI extension (aspnet_isapi.dll) and an ISAPI filter (aspnet_filter.dll). IIS just treats ASP.NET as an external plugin implemented in ISAPI and works with it like a black box (and only when it’s needs to give out the request to ASP.NET). In this mode, ASP.NET is not much different from PHP or other technologies for IIS.

Integrated mode, on the other hand, is a new mode in IIS7 where IIS pipeline is tightly integrated (i.e. is just the same) as ASP.NET request pipeline. ASP.NET can see every request it wants to and manipulate things along the way. ASP.NET is no longer treated as an external plugin. It’s completely blended and integrated in IIS. In this mode, ASP.NET HttpModules basically have nearly as much power as an ISAPI filter would have had and ASP.NET HttpHandlers can have nearly equivalent capability as an ISAPI extension could have. In this mode, ASP.NET is basically a part of IIS.

Reference: Narendra Singh (http://blog.sikarnarender.com)

Comparision between IIS6.0, IIS 7.0 & IIS 7.5

IIS 7.0 has a modular architecture. Modules, also called extensions, can be added or removed individually so that only modules required for specific functionality have to be installed. IIS 7 includes native modules as part of the full installation. These modules are individual features that the server uses to process requests and include the following:

  • Security modules – Used to perform many tasks related to security in the request-processing pipeline, such as specifying authentication schemes, performing URL authorization, and filtering requests.
  • Content modules – Used to perform tasks related to content in the request-processing pipeline, such as processing requests for static files, returning a default page when a client does not specify a resource in a request, and listing the contents of a directory.
  • Compression modules – Used to perform tasks related to compression in the request-processing pipeline, such as compressing responses, applying Gzip compression transfer coding to responses, and performing pre-compression of static content.
  • Caching modules – Used to perform tasks related to caching in the request-processing pipeline, such as storing processed information in memory on the server and using cached content in subsequent requests for the same resource.
  • Logging and Diagnostics modules – Used to perform tasks related to logging and diagnostics in the request-processing pipeline, such as passing information and processing status to HTTP. sys for logging, reporting events, and tracking requests currently executing in worker processes.
  • IIS 7.5 includes the following additional or enhanced security features:

  • Client certificate mapping
  • IP security
  • Request filtering
  • URL authorization
  • Reference: Narendra Singh (http://blog.sikarnarender.com)

    Delete duplicate records using CTE, Sql Server

    You may use following query :

    WITH CTE(ORDER_ID,REQUEST_ID,ROW_No)
    as
    (
    SELECT ORDER_ID,REQUEST_ID,ROW_NUMBER() OVER(PARTITION BY ORDER_ID ORDER BY ORDER_ID) AS ROW_No
    FROM CRM.ORDER_COMPLIANCE WHERE ORDER_ID=397
    )
    SELECT ORDER_ID,REQUEST_ID,ROW_No FROM CTE
    –DELETE FROM CTE WHERE ROW_NO>1

    There are alternate ways also to achieve this.Share your ideas.

    Reference: Narendra Singh (http://blog.sikarnarender.com)

    How to get difference in year month and days from 2 date values ?

    Following query will give result as (X Years X Months X Days) :

    Declare @DOB DateTime
    DECLARE @yy INT
    DECLARE @mm INT
    DECLARE @dd INT

    SET @DOB=’2011-10-11 00:00:00.000′
    SET @yy = DATEDIFF(mm, @DOB, GETDATE())/12
    SET @mm = DATEDIFF(mm, @DOB, GETDATE())%12 – 1
    SET @dd = ABS(DATEDIFF(dd, DATEADD(mm,@mm , DATEADD(yy, @yy, @DOB)), GETDATE()))
    SELECT Convert(varchar(10),@yy) + ‘ Years ‘ + Convert(varchar(10),@mm) + ‘ Months ‘ + Convert(varchar(10),@dd) + ‘ Days ‘

    There are alternate ways also to achieve this.Share your ideas.

    Reference: Narendra Singh (http://blog.sikarnarender.com)