ISAPI filter and directory browsing

  • Thread starter Thread starter Dmitry Duginov
  • Start date Start date
D

Dmitry Duginov

I have a virtual directory where I allow browsing. When I implemented ISAPI
filter for this directory (I deny access in some cases based on request
headers), the contents of the directory are not being generated anymore. How
do I (from my Http module code) explicitly call IIS script that generates
directory contents? Or suggest, please other options to achieve the same
result.

Thanks in advance,
Dmitry.
 
I assume that your now passing all traffic for this application via the asp
isapi, and your module is now in the pipeline. This effectively means that
some functionality typically provided by IIS is now being given to the asp
isapi - thus you'll have to replicate some of the functionality.

You could add the method directly to the ihttpmodule to list the directory,
and return the details via the filter option by modifying the binary output
stream for those allowed to browse. Or try a server transfer from within
the module to an asp.net script that lists it.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
Thanks for John's inputs,

Hi Dmitry,

ASP.NET by default will only take care of those request which has
particular extensions such as ".aspx" ".asmx" ..... , so if the user type
the following url

"http://server/vdir/" ,

it won't be router to ASP.NET pipeline, but success or fail according to
the IIS's vdir setting. So what kind of directory browsing function do you
want to implement? Is it possible that we provide a certain HttpHandler
(mapping to a certain extenstion) to display directory structure ? From my
view, this is a formal means in ASP.NET.
Also, if you do need to accept those raw request to directory path,
"http://server/vdir/"

you may need considering use unmanaged ISAPI filter.

Thanks,


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top