how to disable directory listing like htpaccess in ?

Posted on 2011-10-17
Last Modified: 2012-05-12
i like to implement the same as below in application
is it possible by this way ?
author said like this ..
"By default when accessing any directory which does not contain an index file (ex: a directory listing will be shown displaying a list of the files in that folder. Simply adding a blank/ 0 byte text file named “index.html” will prevent this directory list from being displayed" But it doesnot work

if i have index.htm  in a folder of application and then  opened the directory listing on the browser it stills displays the listing and not showing the index.htm page ?

what is alternate solution for .htaccess in application?

or is this the only way
Using IIS manager right click on the folder that you want to disable browsing , and then uncheck "Directory Browsing" option

Any other way we can implement it by either using .htaccess approach or using vb/C# coding?
Question by:Rajar Ahmed
    LVL 14

    Assisted Solution

    by:Daniel Junges

    appcmd set config /section:directoryBrowse /enabled:true|false

    LVL 83

    Accepted Solution

    Did you see this in the link above?

    By default, directory browsing is disabled in IIS so that users cannot see the contents of directories.

    If index.htm does not work, use a default.aspx as its an site.
    LVL 3

    Expert Comment


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now