Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a folder, e.g.

~/files/Web.config <-- single root config

I want to disallow directory listing for it, but want - for all sub-directories, i.e.

~/files/dir1/ <-- no child config
~/files/dir2/ <-- no child config


How can I config that?

share|improve this question

migrated from stackoverflow.com Nov 28 '10 at 9:48

This question came from our site for professional and enthusiast programmers.

(transfer to SF at request of OP) –  Marc Gravell Nov 28 '10 at 9:47

1 Answer 1

Using iis 7 do it directly to the folder you can then see if you have a section added to your wc.

share|improve this answer
I don't want to create new Web.config for each 1st level sub dirs. I want to configure that using single root Web.config, –  abatishchev Nov 27 '10 at 17:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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