David
Tue Jan 31 16:37:19 CST 2006
You are most likely not trapping all necessary events to do what you stated.
I haven't verified stsfltr, but I suspect you need to also register for
SF_NOTIFY_PREPROC_HEADERS and call GetHeader("url").
GetServerVariable("URL") does not work in OnPreprocHeaders because the
headers haven't been parsed yet (that's why you can read/modify the URL
before IIS processes it)
--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"gc" <gc@notsobig.com> wrote in message
news:OjspZ8lJGHA.216@TK2MSFTNGP15.phx.gbl...
> David,
>
> Sorry if I am being stupid, I am very new to ISAPI programming, but how do
> I do that. I cannot seem to get my filter to intercept the request before
> stsfltr. It seems to get there first every time. Am I trapping the wrong
> event.
>
> Thanks,
>
> Geoff
>
> "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> news:O5g4SOlJGHA.2212@TK2MSFTNGP15.phx.gbl...
>> If stsfltr is altering the Url before OnAuthComplete, then your filter
>> needs to listen to that same event and capture the URL value prior to the
>> alteration...
>>
>> --
>> //David
>> IIS
>>
http://blogs.msdn.com/David.Wang
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> //
>>
>> "gc" <gc@notsobig.com> wrote in message
>> news:eqhQuSkJGHA.2040@TK2MSFTNGP14.phx.gbl...
>>> David,
>>>
>>> Thanks for the reply. I will post to
>>> microsoft.public.platformsdk.internet.server.isapi-dev
>>> as suggested but in reply here is a bit more information.
>>>
>>> The URL I am trying to capture is the URL request sent from the Browser
>>> (whatever the user typed in).
>>>
>>> The Username I am trying to capture is the domain user that sharepoint
>>> uses for authentication which I am able to capture in the OnAuthComplete
>>> event the problem seems to be that stsfltr is altering the url before
>>> the OnAuthComplete is fired.
>>>
>>> Many Thanks,
>>>
>>> Geoff
>>> "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
>>> news:%23MEmXbgJGHA.3224@TK2MSFTNGP09.phx.gbl...
>>>
>>>> You should ask this in:
>>>> microsoft.public.platformsdk.internet.server.isapi-dev
>>>>
>>>> What you are trying to do is possible. MSDN Documentation should help
>>>> with the basics. But you really need to understand ISAPI Filter and IIS
>>>> very well before trying to modify its behavior and interact with
>>>> another filter. You need to be good at reverse engineering how the
>>>> filter works... or else the resulting behavior won't make sense and you
>>>> won't be able to figure out where the problem lies. Of course, since
>>>> stsfltr is not a public API, how it works is correctly undocumented...
>>>> which is a large part of the challenge.
>>>>
>>>> Some helpful info:
>>>> - It is always possible to insert one filter ahead of another
>>>> - You need to determine what "Original URL" means, especially when
>>>> ISAPIs can rewrite the URL on the server. Do you want whatever the user
>>>> typed in, what actually ends up executing, or something in between that
>>>> contains the metadata you want
>>>> - You need to determine what "username" means, especially if there is
>>>> customized authentication
>>>>
>>>> --
>>>> //David
>>>> IIS
>>>>
http://blogs.msdn.com/David.Wang
>>>> This posting is provided "AS IS" with no warranties, and confers no
>>>> rights.
>>>> //
>>>>
>>>> "gc" <gc@notsobig.com> wrote in message
>>>> news:u2BRlfbJGHA.3176@TK2MSFTNGP12.phx.gbl...
>>>>>I am trying to develop an ISAPI filter to run before stsfltr on a
>>>>>sharepoint portal server. I am basically trying to capture the username
>>>>>and the url from the request but it appears that even with my custom
>>>>>filter higher in the ISAPI list stsfltr is called first. If a request
>>>>>is made for a document within sharepoint (eg
>>>>>
http://servername/sites/ACLTest/Shared%20Documents/GRCM263TMA01Q5.txt )
>>>>>then the url returned is "/_vti_bin/owssvr.dll". What I want to be able
>>>>>to to is capture the original url along with the username. Is this
>>>>>possible? Any help greatly appreciated.
>>>>>
>>>>> TIA
>>>>>
>>>>> Geoff
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>