We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

IIS6 ISAPI ==> IIS7 [Answered]RSS

10 replies

Last post Sep 10, 2008 10:20 AM by zdenek

  • IIS6 ISAPI ==> IIS7

    May 11, 2007 05:16 PM|ojm37|LINK

    What do I need to do to get my ISAPI Filter that was working in IIS6 to work in IIS7 on Vista?

    TIA,
    Owen

    Owen
  • Re: IIS6 ISAPI ==> IIS7

    May 11, 2007 05:44 PM|anilr|LINK

    Unless your ISAPI filter was using SF_NOTIFY_READ_RAW_DATA, which was only supported in IIS5 isolation mode in IIS6 and is not supported at all in IIS7 - you just need to install the ISAPI filter component of IIS and then install your ISAPI filter - I believe there is no UI for this in vista rtm, so would need to do it using command-line scripts.
    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: IIS6 ISAPI ==> IIS7

    May 11, 2007 06:58 PM|ojm37|LINK

    Does it make a difference that I'm using IIS7 on Vista?  I installed by ISAPI filter using the filter GUI in the IIS7 Manager in Vista.... The filter is not doing it's thing, however.

    I'm trapping the  OnLog event of the CHttpFilter object.

     Thanks,
    Owen

    Owen
  • Re: IIS6 ISAPI ==> IIS7

    May 13, 2007 05:37 PM|anilr|LINK

    Can you go into more detail about what it is the filter is trying to do that is not working?
    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: IIS6 ISAPI ==> IIS7

    May 14, 2007 01:45 PM|ojm37|LINK

    It's a modification of an ISAPI Logger filter that I found on the Internet (http://www.codeproject.com/aspnet/isapilogger.asp).  What it does is intercept the http request, find a particular cookie and insert the contents of the cookie into the IIS logfile in ther "User" field.

    I think IIS7 will allow us to someday replace this functionality with an IIS module. However, IIS6 is still our production server and I'd like to get this ISAPI Filter working on our IIS7 development machines.

    Owen

    Owen
  • Re: IIS6 ISAPI ==> IIS7

    May 14, 2007 01:53 PM|anilr|LINK

    This is a known bug that is fixed in longhorn server beta 3 and will be fixed in vista sp1.
    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: IIS6 ISAPI ==> IIS7

    May 14, 2007 01:58 PM|ojm37|LINK

    _what_ is a known bug? Is there a part of this type of ISAPI filter that is broken?
    Owen
  • Re: IIS6 ISAPI ==> IIS7

    May 14, 2007 02:31 PM|anilr|LINK

    The known bug is that values modified by SF_NOTIFY_LOG filters are not reflected in the IIS log file.
    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: IIS6 ISAPI ==> IIS7

    Sep 08, 2008 02:28 PM|zdenek|LINK

     I have purchased windows 2008 server web edition and SF_NOTIFY_LOG seems to be still broken...

     

    relevant code:

        else if (is_inited && (dwNotificationType == SF_NOTIFY_LOG)) {
            jk_log(logger, JK_LOG_DEBUG, "[SF_NOTIFY_LOG]");
            if (pfc->pFilterContext) {
                isapi_log_data_t *ld = (isapi_log_data_t *)pfc->pFilterContext;
                HTTP_FILTER_LOG  *pl = (HTTP_FILTER_LOG *)pvNotification;
                jk_log(logger, JK_LOG_DEBUG, "[SF_NOTIFY_LOG] uri [%s]", ld->uri);
                jk_log(logger, JK_LOG_DEBUG, "[SF_NOTIFY_LOG] query [%s]", ld->query);
                jk_log(logger, JK_LOG_DEBUG, "[SF_NOTIFY_LOG] pszTarget [%s]", pl->pszTarget);
                jk_log(logger, JK_LOG_DEBUG, "[SF_NOTIFY_LOG] pszParameters [%s]", pl->pszParameters);
                pl->pszTarget = ld->uri;
                pl->pszParameters = ld->query;
                jk_log(logger, JK_LOG_DEBUG, "[SF_NOTIFY_LOG] after change pszTarget [%s]", pl->pszTarget);
                jk_log(logger, JK_LOG_DEBUG, "[SF_NOTIFY_LOG] after change pszParameters [%s]", pl->pszParameters);
                return SF_STATUS_REQ_NEXT_NOTIFICATION;
            }
        }

     

     and the log it spits out

     

    [Mon Sep 08 14:10:09.414 2008] [2240:2936] [debug] HttpFilterProc::jk_isapi_plugin.c (1436): [SF_NOTIFY_LOG]
    [Mon Sep 08 14:10:09.414 2008] [2240:2936] [debug] HttpFilterProc::jk_isapi_plugin.c (1440): [SF_NOTIFY_LOG] uri [/go/network_equipment]
    [Mon Sep 08 14:10:09.414 2008] [2240:2936] [debug] HttpFilterProc::jk_isapi_plugin.c (1441): [SF_NOTIFY_LOG] query []
    [Mon Sep 08 14:10:09.414 2008] [2240:2936] [debug] HttpFilterProc::jk_isapi_plugin.c (1442): [SF_NOTIFY_LOG] pszTarget [/jakarta/isapi_redirect.dll]
    [Mon Sep 08 14:10:09.414 2008] [2240:2936] [debug] HttpFilterProc::jk_isapi_plugin.c (1443): [SF_NOTIFY_LOG] pszParameters []
    [Mon Sep 08 14:10:09.414 2008] [2240:2936] [debug] HttpFilterProc::jk_isapi_plugin.c (1446): [SF_NOTIFY_LOG] after change pszTarget [/go/network_equipment]
    [Mon Sep 08 14:10:09.414 2008] [2240:2936] [debug] HttpFilterProc::jk_isapi_plugin.c (1447): [SF_NOTIFY_LOG] after change pszParameters []
     

     

    yet IIS has this in the log:

     

    #Software: Microsoft Internet Information Services 7.0
    #Version: 1.0
    #Date: 2008-09-08 18:08:00
    #Fields: date time cs-method cs-uri-stem cs-uri-query c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
    2008-09-08 18:08:01 GET /jakarta/isapi_redirect.dll - x.x.x.x Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9.0.1)+Gecko/2008070208+Firefox/3.0.1 http://x.x.x.x/go/network_equipment 200 0 0 3657 511 122

     

    so that clearly did not take the change on SF_NOTIFY_LOG event.

     

    Any news on when this will be fixed?

    SF_NOTIFY_LOG IIS7 broken windows 2008

  • Re: IIS6 ISAPI ==> IIS7

    Sep 08, 2008 02:43 PM|anilr|LINK

    A qfe for this was released a couple months ago but looks like the kb article has still not been published - call microsoft support and ask for hotfix for kb 956120

    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: IIS6 ISAPI ==> IIS7

    Sep 10, 2008 10:20 AM|zdenek|LINK

     A hot fix for this problem is now available for download from http://support.microsoft.com/kb/956120