0

How can I want to run a script on the pages that IIS returns when you browse the contents of a virtual directory (visiting the folders).

The closest I could find was this full-blown module for generating pretty directory listings, where I could add a script to the page, but that's a lot more than I want.

Is there any simpler way that I can override/modify the default template page that gets used for displaying the directory contents?

1 Answer 1

1

Unfortunately I could not find any way to actually change that template.

The best I've been able to find is that you would have to develop your own IIS module or handler to override the default behavior: http://www.iis.net/learn/develop/runtime-extensibility/developing-iis-modules-and-handlers-with-the-net-framework. The link you provided would probably be the quickest route since the code is mostly done for you already.

Update: you could also just create your own default.asp page and place it in every folder you want to have your customized listing. Code sample can be found as the answer to this question here: http://www.webmasterworld.com/forum47/520.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.