Re: pszPhysicalPath not working with directory request on IIS 6

From: Matt McGitny (anonymous_at_discussions.microsoft.com)
Date: 03/19/04


Date: Fri, 19 Mar 2004 13:08:17 -0800

Thank you David for the helpful reply.
I will dig into all this to see where I'm going wrong.
If I have more trouble I'll try to locate the other list
you've mentioned and post there instead.

Matt

>-----Original Message-----
>FYI: ISAPI related questions should go to:
>microsoft.public.platformsdk.internet.server.isapi-dev
>
>How does your filter deal with the fact that
SF_NOTIFY_URL_MAP fires
>multiple times for a given request?
>
>What is probably happening in your case is that you are
modifying
>pszPhysicalPath in SF_NOTIFY_URL_MAP event only once per
request. However,
>you're assuming that it only fires once per request --
which is incorrect.
>In particular, for default document lookup (your case
#2), the first
>SF_NOTIFY_URL_MAP will be for / while a second
SF_NOTIFY_URL_MAP event will
>be for what "/" maps to -- and the pszPhysicalPath of
THAT event is what you
>need to modify since that is what IIS is going to
execute. You're getting a
>404 because you didn't modify pszPhysicalPath correctly.
>
>However, in general, an arbitrary number of
SF_NOTIFY_URL_MAP events can
>fire for a request, and a proper ISAPI Filter must handle
them all
>correctly. For example, HSE_REQ_EXEC_URL allows server-
side redirection of
>URLs on IIS6, and each redirection triggers at least one
SF_NOTIFY_URL_MAP
>event.
>
>Thus, a filter that is doing custom URL-to-Physical path
mapping MUST handle
>all invocations of the SF_NOTIFY_URL_MAP event correctly.
>
>--
>//David
>IIS
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>//
>"Matt McGinty" <anonymous@discussions.microsoft.com>
wrote in message
>news:1003d01c40d34$2f1014a0$a101280a@phx.gbl...
>Hello.
>I searched this forum for pszPhysicalPath and found no
>entries. Apologies if this has been asked & answered
>before...
>
>I have an ISAPI filter that hooks into IIS which has
>worked fine on IIS 4 &
>IIS 5 for years.
>But with IIS 6 I'm seeing one feature fail on certain
>types of
>requests... here are the technical details:
>
>My filter is registered to be notified of the
>SF_NOTIFY_URL_MAP event.
>At that time, my filter changes the logical-to-physical
>mapping
>of the request.
>
>Request case #1 which works in IIS 4, IIS 5, & IIS 6:
>
> a. user requests "http://>/test/index.html"
> b. I can examine the values in the HTTP_FILTER_URL_MAP
>notification structure
> and confirm that they are correct:
>
> 1. pszURL has the correct value
>of "/test/index.html"
> 2. my code has correctly set the value of
>pszPhysicalPath to be:
> "d:\myCustomContexts\test\index.html"
> c. IIS then correctly serves
>d:\myCustomContexts\test\index.html to the client
>
>Request case #2 which works in IIS 4 & IIS 5, but fails
>with IIS 6:
>
> a. user requests "
http://>/test/"
> b. I can examine the values in the HTTP_FILTER_URL_MAP
>notification structure
> and confirm that they are correct:
>
> 1. pszURL has the correct value of "/test/"
> 2. my code has correctly set the value of
>pszPhysicalPath to be:
> "d:\myCustomContexts\test\index.html"
>
> c. IIS then returns a 404 not found.
>
>
>I can't figure out why IIS 6 won't find the file... it's
>there and was
>served by the request that named the file.
>
>It seems that if IIS 6 gets a directory request such as
>"
http://>/test/" (i.e. where the file is not named)
>that for some reason
>it does not look at the value my filter has given to
>pszPhysicalPath.
>
>
>Thanks in advance for any input.
>
>Matt McGinty
>matt@newatlanta.com
>
>
>.
>



Relevant Pages

  • Re: IIS Extensions in URL causes filter to break.
    ... If your filter operates the way you say, ... IIS can only say that one or more of the events contain ... every request, and maybe more than once, depending on whether the URL causes ... As for the order of handling between ISAPI Extensions and Filters - Filters ...
    (microsoft.public.inetserver.iis.security)
  • Re: IIS Extensions in URL causes filter to break.
    ... I delete all cached files at the browser to ensure that the browser ... I confirmed using NetMon on IIS server that the static HTML is ... What my filter does exactly? ... It filters every incoming request looking for "mystring" inside it. ...
    (microsoft.public.inetserver.iis.security)
  • pszPhysicalPath not working with directory request on IIS 6
    ... I searched this forum for pszPhysicalPath and found no ... I have an ISAPI filter that hooks into IIS which has ... user requests "http://>/test/index.html" ...
    (microsoft.public.inetserver.misc)
  • pszPhysicalPath not working with directory request on IIS 6
    ... I searched this forum for pszPhysicalPath and found no ... I have an ISAPI filter that hooks into IIS which has ... user requests "http://>/test/index.html" ...
    (microsoft.public.inetserver.iis)
  • Re: IIS with ISAPI filter does not respond on load testing
    ... this filter is making incorrect assumptions and causing IIS ... Around the 43rd request the IIS stops responding to ... reqContent = malloc); ...
    (microsoft.public.inetserver.iis)

Loading