Re: pszPhysicalPath not working with directory request on IIS 6
From: Matt McGitny (anonymous_at_discussions.microsoft.com)
Date: 03/19/04
- Next message: Ken Schaefer: "Re: New Build in IIS 2003 will not Run .NET Files"
- Previous message: Paul McGuire: "Re: Busty Neighbour Sunbathing"
- In reply to: David Wang [Msft]: "Re: pszPhysicalPath not working with directory request on IIS 6"
- Messages sorted by: [ date ] [ thread ]
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://
> 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://
> 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://
>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
>
>
>.
>
- Next message: Ken Schaefer: "Re: New Build in IIS 2003 will not Run .NET Files"
- Previous message: Paul McGuire: "Re: Busty Neighbour Sunbathing"
- In reply to: David Wang [Msft]: "Re: pszPhysicalPath not working with directory request on IIS 6"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|