Sharepoint ISAPI problem
am 30.01.2006 17:13:17 von gc
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/GRCM263TM A01Q5.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
Re: Sharepoint ISAPI problem
am 31.01.2006 02:35:16 von someone
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" 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/GRCM263T MA01Q5.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
>
Re: Sharepoint ISAPI problem
am 31.01.2006 10:01:03 von gc
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]" 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" 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/GRCM263 TMA01Q5.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
>>
>
>
Re: Sharepoint ISAPI problem
am 31.01.2006 11:46:30 von someone
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" 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]" 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" 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/GRCM26 3TMA01Q5.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
>>>
>>
>>
>
>
Re: Sharepoint ISAPI problem
am 31.01.2006 13:10:11 von gc
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]" 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" 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]" 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" 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/GRCM2 63TMA01Q5.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
>>>>
>>>
>>>
>>
>>
>
>
Re: Sharepoint ISAPI problem
am 31.01.2006 23:37:19 von someone
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" 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]" 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" 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]" 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" 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/GRCM 263TMA01Q5.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
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
RE: Sharepoint ISAPI problem
am 10.10.2007 16:53:21 von Robert Faulkner
We want to migrate from WSS2003 to Moss 2007 hosted in a completely different server based on site collection.We will gradually move site collection wise.
After moving the site collections of 2003 to Moss I want to redirect the users who type the 2003 site collection url to Moss 2007 site collection url.
For this to happen I am using Custom ISAPI filter dll and defining the rewrite rules for the same
But the in built-in WSS "stsfltr" is running first. ThatÂ’s why I am not able to get the complete sitecollection url by the time request comes to my custom ISAPI filter.
Eg: Requested Url :http://server/sitecoll/_layouts/1033/settings.aspx
Changed to :http://server/_layouts/1033/settings.aspx when it comes to my custom ISAPI filter
Because of the above behaviour I am not able to redirect url based on site collection level
Can you suggest me a solution for this.
From http://www.google.co.in/search?q=run+an+ISAPI+filter+before+ stsfltr&hl=en&start=40&sa=N
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Re: Sharepoint ISAPI problem
am 11.10.2007 20:48:12 von David Wang
On Oct 10, 7:53 am, John Paul wrote:
> We want to migrate from WSS2003 to Moss 2007 hosted in a completely different server based on site collection.We will gradually move site collection wise.
>
> After moving the site collections of 2003 to Moss I want to redirect the users who type the 2003 site collection url to Moss 2007 site collection url.
>
> For this to happen I am using Custom ISAPI filter dll and defining the rewrite rules for the same
>
> But the in built-in WSS "stsfltr" is running first. That's why I am not able to get the complete sitecollection url by the time request comes to my custom ISAPI filter.
>
> Eg: Requested Url :http://server/sitecoll/_layouts/1033/settings.aspx
> Changed to :http://server/_layouts/1033/settings.aspx when it comes to my custom ISAPI filter
>
> Because of the above behaviour I am not able to redirect url based on site collection level
>
> Can you suggest me a solution for this.
>
> Fromhttp://www.google.co.in/search?q=run+an+ISAPI+filter+bef ore+stsfltr&h...
>
> Posted via DevelopmentNow.com Groupshttp://www.developmentnow.com
Please do not multi-post.
Already answered on isapi-dev newsgroup
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
Re: Sharepoint ISAPI problem
am 11.10.2007 23:54:49 von Anthony Jones
"David Wang" wrote in message
news:1192128492.604926.69620@22g2000hsm.googlegroups.com...
> On Oct 10, 7:53 am, John Paul wrote:
> > We want to migrate from WSS2003 to Moss 2007 hosted in a completely
different server based on site collection.We will gradually move site
collection wise.
> >
> > After moving the site collections of 2003 to Moss I want to redirect the
users who type the 2003 site collection url to Moss 2007 site collection
url.
> >
> > For this to happen I am using Custom ISAPI filter dll and defining the
rewrite rules for the same
> >
> > But the in built-in WSS "stsfltr" is running first. That's why I am not
able to get the complete sitecollection url by the time request comes to my
custom ISAPI filter.
> >
> > Eg: Requested Url :http://server/sitecoll/_layouts/1033/settings.aspx
> > Changed to :http://server/_layouts/1033/settings.aspx when it
comes to my custom ISAPI filter
> >
> > Because of the above behaviour I am not able to redirect url based on
site collection level
> >
> > Can you suggest me a solution for this.
> >
> >
Fromhttp://www.google.co.in/search?q=run+an+ISAPI+filter+bef ore+stsfltr&h...
> >
> > Posted via DevelopmentNow.com Groupshttp://www.developmentnow.com
>
>
> Please do not multi-post.
>
> Already answered on isapi-dev newsgroup
>
Not heard of that group, whats its fullname?
--
Anthony Jones - MVP ASP/ASP.NET
Re: Sharepoint ISAPI problem
am 12.10.2007 06:06:26 von David Wang
On Oct 11, 2:54 pm, "Anthony Jones" wrote:
> "David Wang" wrote in message
>
> news:1192128492.604926.69620@22g2000hsm.googlegroups.com...> On Oct 10, 7=
:53 am, John Paul wrote:
> > > We want to migrate from WSS2003 to Moss 2007 hosted in a completely
>
> different server based on site collection.We will gradually move site
> collection wise.
>
> > > After moving the site collections of 2003 to Moss I want to redirect =
the
>
> users who type the 2003 site collection url to Moss 2007 site collection
> url.
>
> > > For this to happen I am using Custom ISAPI filter dll and defining the
>
> rewrite rules for the same
>
> > > But the in built-in WSS "stsfltr" is running first. That's why I am =
not
>
> able to get the complete sitecollection url by the time request comes to =
my
> custom ISAPI filter.
>
> > > Eg: Requested Url :http://server/sitecoll/_layouts/1033/settings.aspx
> > > Changed to :http://server/_layouts/1033/settings.aspxwhen it
>
> comes to my custom ISAPI filter
>
> > > Because of the above behaviour I am not able to redirect url based on
>
> site collection level
>
> > > Can you suggest me a solution for this.
>
> Fromhttp://www.google.co.in/search?q=3Drun+an+ISAPI+filter+b efore+stsfltr=
&h...
>
>
>
> > > Posted via DevelopmentNow.com Groupshttp://www.developmentnow.com
>
> > Please do not multi-post.
>
> > Already answered on isapi-dev newsgroup
>
> Not heard of that group, whats its fullname?
>
> --
> Anthony Jones - MVP ASP/ASP.NET
microsoft.=ADpublic.=ADplatformsdk.=ADinternet.=ADserver.=AD isapi-dev