ISAPI filter and directory browsing

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.
 
J

John Timney \(ASP.NET MVP\)

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
 
S

Steven Cheng[MSFT]

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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top