HTTP Modules & Handlers or ISAPI?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PCC

    #1

    HTTP Modules & Handlers or ISAPI?

    I need to be able to redirect web requests from certain parties to specific
    content. In the old days I would have used ISAPI to do this. Now days I am
    wondering if I should be doing this using HTTP Modules & Handlers or ISAPI.
    All the machines are running IIS6 and have the .NET framework installed. In
    the end I would like to code in C# but am concerned about the performance
    cost of using HTTP Modules & Handlers over that of just using ISAPI. On
    thing I thought of was using ISAPI and then just called code I have written
    in C#, but then I have the performance hit of marshalling.



    Would you please share your thoughts here? What is the best and fastest way
    to do this (in any language)? What is the best and fastest way to do this
    using C#, and how bad will the performance hit I take be? Any suggestions,
    articles, links, samples, etc. would be greatly appreciated. Thank you.


  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: HTTP Modules & Handlers or ISAPI?

    Hi,

    I think HTTP handlers are the managed way to go. They of course will be
    little bit slower than properly designed ISAPI, but since they are compiled
    into managed code, I don't think there will be performance penalty.

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE

    "PCC" <pccgenx@hotmai l.com> wrote in message
    news:egx8wFkmDH A.1740@TK2MSFTN GP12.phx.gbl...[color=blue]
    > I need to be able to redirect web requests from certain parties to[/color]
    specific[color=blue]
    > content. In the old days I would have used ISAPI to do this. Now days I[/color]
    am[color=blue]
    > wondering if I should be doing this using HTTP Modules & Handlers or[/color]
    ISAPI.[color=blue]
    > All the machines are running IIS6 and have the .NET framework installed.[/color]
    In[color=blue]
    > the end I would like to code in C# but am concerned about the performance
    > cost of using HTTP Modules & Handlers over that of just using ISAPI. On
    > thing I thought of was using ISAPI and then just called code I have[/color]
    written[color=blue]
    > in C#, but then I have the performance hit of marshalling.
    >
    >
    >
    > Would you please share your thoughts here? What is the best and fastest[/color]
    way[color=blue]
    > to do this (in any language)? What is the best and fastest way to do this
    > using C#, and how bad will the performance hit I take be? Any[/color]
    suggestions,[color=blue]
    > articles, links, samples, etc. would be greatly appreciated. Thank you.
    >
    >[/color]

    Comment

    • Nicholas Paldino [.NET/C# MVP]

      #3
      Re: HTTP Modules &amp; Handlers or ISAPI?

      PCC,

      If you want the ultimate in performance, then you will probably want to
      use an ISAPI dll. While I won't comment on whether or not C++ is faster
      than C# (that's for another time), you will not have the overhead of the
      marshaling of information from the managed to the unmanaged world.

      However, I would generally consider this to be an acceptable hit in
      order to take advantage of the framework. I would use HTTP Handlers and
      Modules (you would use a handler for what you are doing).

      Hope this helps.


      --
      - Nicholas Paldino [.NET/C# MVP]
      - mvp@spam.guard. caspershouse.co m


      "PCC" <pccgenx@hotmai l.com> wrote in message
      news:egx8wFkmDH A.1740@TK2MSFTN GP12.phx.gbl...[color=blue]
      > I need to be able to redirect web requests from certain parties to[/color]
      specific[color=blue]
      > content. In the old days I would have used ISAPI to do this. Now days I[/color]
      am[color=blue]
      > wondering if I should be doing this using HTTP Modules & Handlers or[/color]
      ISAPI.[color=blue]
      > All the machines are running IIS6 and have the .NET framework installed.[/color]
      In[color=blue]
      > the end I would like to code in C# but am concerned about the performance
      > cost of using HTTP Modules & Handlers over that of just using ISAPI. On
      > thing I thought of was using ISAPI and then just called code I have[/color]
      written[color=blue]
      > in C#, but then I have the performance hit of marshalling.
      >
      >
      >
      > Would you please share your thoughts here? What is the best and fastest[/color]
      way[color=blue]
      > to do this (in any language)? What is the best and fastest way to do this
      > using C#, and how bad will the performance hit I take be? Any[/color]
      suggestions,[color=blue]
      > articles, links, samples, etc. would be greatly appreciated. Thank you.
      >
      >[/color]


      Comment

      • PCC

        #4
        Re: HTTP Modules &amp; Handlers or ISAPI?

        Thanks you guys. I feel better knowing that others think I should use C#
        and the framework. I was terrified that people in my shop would be shocked
        that I had not used ISAPI. Thanks again.

        PS - Nicholas Paldino, I swear you have answered at least fifty of my posts
        over the years. Thank you for your contribution.

        "PCC" <pccgenx@hotmai l.com> wrote in message
        news:egx8wFkmDH A.1740@TK2MSFTN GP12.phx.gbl...[color=blue]
        > I need to be able to redirect web requests from certain parties to[/color]
        specific[color=blue]
        > content. In the old days I would have used ISAPI to do this. Now days I[/color]
        am[color=blue]
        > wondering if I should be doing this using HTTP Modules & Handlers or[/color]
        ISAPI.[color=blue]
        > All the machines are running IIS6 and have the .NET framework installed.[/color]
        In[color=blue]
        > the end I would like to code in C# but am concerned about the performance
        > cost of using HTTP Modules & Handlers over that of just using ISAPI. On
        > thing I thought of was using ISAPI and then just called code I have[/color]
        written[color=blue]
        > in C#, but then I have the performance hit of marshalling.
        >
        >
        >
        > Would you please share your thoughts here? What is the best and fastest[/color]
        way[color=blue]
        > to do this (in any language)? What is the best and fastest way to do this
        > using C#, and how bad will the performance hit I take be? Any[/color]
        suggestions,[color=blue]
        > articles, links, samples, etc. would be greatly appreciated. Thank you.
        >
        >[/color]


        Comment

        Working...