Browse by Tags
All Tags »
ISAPI (
RSS)
I know I'm in a very old world of writing ISAPI Filters to do the redirection instead of just creating an IHttpModule and plug it directly in the IIS7 request pipeline. But, one of my customer wanted this ISAPI filter and I made a fairly simple ISAPI Filter to do the redirection. Below sample doesn't do any checks, or maintains any lists of mapped URLs, but just a simple redirection of all the requests to http://www.live.com . Feel free to modify it accommodating your need. Code Snippet #include <stdio.h> #include <stdlib.h> #include <afx.h> #include <afxisapi.h> BOOL WINAPI __stdcall GetFilterVersion(HTTP_FILTER_VERSION *pVer) { pVer->dwFlags = (SF_NOTIFY_PREPROC_HEADERS ); CFile myFile( "C:\\ISAPILOG\\URLs.html" , CFile::modeCreate); myFile.Close(); pVer->dwFilterVersion = HTTP_FILTER_REVISION; strcpy(pVer->lpszFilterDesc, "Sample Redirection ISAPI" ); return TRUE; } DWORD WINAPI __stdcall HttpFilterProc(HTTP_FILTER_CONTEXT...
For post #4 in the IIS7 Modules vs. IIS6 ISAPI series, let's take a look at another common pattern in IIS module development - storing request-specific state inside your module. Read more at http://mvolo.com/blogs/serverside/archive/2006/12/25/Managing-request-state-in-your-IIS7-module.aspx . Read More...
For post #3 in the IIS7 Modules vs. IIS6 ISAPI series, let’s look at one of the biggest trouble areas that bite ISAPI developers - managing memory. Read more on http://mvolo.com/2006/11/01/iis7-modules-vs-iis6-isapi-memory-management.aspx . Read More...
This is the second post in the series on why IIS7 module development beats the pants off the ISAPI development for the previous version of IIS. Today's topic - the rich class-based IIS7 object model. Read more on http://mvolo.com/2006/10/12/iis7-modules-vs-iis6-isapi-reason-9-intuitive-object-model.aspx . Read More...
The first post in the IIS6 ISAPI vs IIS7 module development series. This one is about the basics, and why they make such a big difference. Read more here - http://mvolo.com/2006/10/07/why-iis7-module-is-better-then-iis6-isapi---reason-10-c-classbased-encapsulated-model-vs-cstyle-static-functions.aspx . Read More...
As you already know (if you don’t, go read about it right now ), IIS7 core server has been completely re-engineered to provide a brand new extensibility model on top of which all of the server features are built. This allows anyone to remove/replace all existing server features, or add new ones - by using either the new native APIs, or the managed ASP.NET APIs. Over the past two years, we did a bunch of work to make sure the new native APIs are easy to use and help write more robust server code. But, it is hard to appreciate all the benefits until you actually compare writing an IIS7 module with writing an IIS6 ISAPI Extension – I am often amazed at how nice some of the little improvements can make your life. Read more here - http://mvolo.com/2006/10/07/10-reasons-why-developing-server-components-with-the-iis7-native-api-is-10-times-much-better-then-iis60-isapi.aspx . Read More...
More Posts