Re: Document libaries and isapi filters

From: Cristovao Matos (cristovao.matos_at_novabase.pt)
Date: 10/12/04


Date: Tue, 12 Oct 2004 18:04:39 +0100

Liamo,

I had the same problem as I was trying to intercept requests to files in a
document library. I tried to intercept the request with an httphandler,
mapping the file extensions to the asp.net process, but, unfortunately this
don't work, because sharepoint stsfltr ISAPI filter intercepts the request
at a lower level.

I need to intecept the documents download to do a security check, as
sharepoint doesn't have ACLs at document library item level. I found a
workaround to this after tons of try-outs...

I developed an HTTPHandler to intercept .aspx requests at the document
libraries paths. After I save the document on the document library I rename
it and attach a new "aspx" file extension, e.g, if the file name is
xpto.doc, I save it and then (using document libraries events) rename it to
xpto.doc.aspx. This way, when the user clicks in the document link, the
request is intercepted with the HttpHandler and then we can perform the
security check and if it passes, output the file content to the browser.

Give me some feedback if this works for you.

Cristovao Matos,
Novabase, Portugal

"Liamo" <Liamo@discussions.microsoft.com> escreveu na mensagem
news:1554D23C-AD06-43BC-B55C-6D9F1286CC0A@microsoft.com...
> I am attempting to implement an ISAPI filter to respond to requests for
> documents in Sharepoint document libraries. The ISAPI filter was developed
in
> C++ 7.0 using the MFC ISAPI Extension Dll template in visual studio. The
> following notification options were set:
> Priority: High
> Filter connection types: Secured port sessions + Nonsecured port sessions
> Notifications for the filter to process: Post-preprocessing of the request
> headers.
>
> The filter was installed above the Sharepoint stsfltr.dll filter in the
> Default Web Site in IIS. Requests for Sharepoint pages such as document
> libraries are being caught however requests for individual documents
> (initaited by clicking the document name in the doc lib) do not trigger
the
> OnPreprocHeaders event in the ISAPI filter.
>
> Should my ISAPI filter intercept requests for documents hosted in
Sharepoint
> document libraries, if yes why is my ISAPI filter not working?
>
>



Relevant Pages

  • Document libaries and isapi filters
    ... I am attempting to implement an ISAPI filter to respond to requests for ... The filter was installed above the Sharepoint stsfltr.dll filter in the ... Requests for Sharepoint pages such as document ... document libraries, if yes why is my ISAPI filter not working? ...
    (microsoft.public.sharepoint.portalserver.development)
  • AW: Forms D2K Application Testing
    ... Can't you see the requests that you send or do you have ... Problems when you intercept the response from the server. ... buy it or download a solution FREE today! ...
    (Pen-Test)
  • Httphandler redirection to document -- GetCompiledPageInstance
    ... I have a number of documents stored on my web server and these documents ... This authentication and authorization comes from a custom database. ... handler to intercept requests for *.doc. ... This works well and all of my requests are intercepted by the handler. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: IHttpModule
    ... it can only process http requests which will be ... passed to the ASP.NET runtime pipeline. ... the ASP.NET extension can not intercept such request either. ...
    (microsoft.public.dotnet.general)