Last post Oct 12, 2008 02:54 AM by malikvakaz
Oct 09, 2008 11:35 PM|saurabh2309|LINK
I am new to IIS and I am trying to replace the existing ISAPI filter/extension in our application to the new HTTP native modules for IIS 7.0. I have understood the essence of the ISAPI filters and extensions. However, when it comes to the HTTP native modules,
I have a couple of queries.
1. Does the native module serve the purpose of an ISAPI filter alone ? Can I put the ISAPI extension code as well inside the native module ? Or I need to specifically create a HTTP handler which would work as an ISAPI extension ?
2. In my earlier application, I had used the wildcard script mapping to run an ISAPI extension at the beginning of every request to a specific web site or virtual directory. Do I need to do the same thing with the native modules as well ? I would be using
the integrated pipeline mode which says that every request would be sent to the list of installed/enabled modules and that it eliminates the need for the wildcard handler mapping. Please clarify ?
Thanks in advance.
Oct 12, 2008 02:54 AM|malikvakaz|LINK
Actually HTTPModules gives u the previlege to handle each request like the way u were doing in ISAPI filter actually ISAPI filter use to be written in Visual C++. but here u can write yr own Http Module in C# or VB. Actually HttpModule is
a portable version of Global.asax. Global.asax holds the event of Application_BeginRequest which captures each and every request to the website, just like the way yr ISAPI filter was doing.
you need to implement IHttpModule interface or use Global.asax for that purpose and additionally if u r doing url rewriting then IIS 7 gives u extensionless url rewriting aswell. so answer to yr first question is that yes u can do the same with HTTPModules
and answer to yr second question is wat i have already mentioned is that u can capture each and every request to yr website
Hope it helps