How to restrict folder access in asp.net

前端 未结 4 1568
感情败类
感情败类 2020-11-28 11:15

How to restrict folder access in asp.net like I don\'t want any other to see my Uploads folder in browser by link http://www.example.com/Uploads

4条回答
  •  被撕碎了的回忆
    2020-11-28 11:38

    You can manage folder browsing in IIS settings.,

    • Open IIS Manager and navigate to the folder you want to manage.

    • In Features View, double-click Directory Browsing.

    • In the Actions pane, click Enable/Disable.

    This is for IIS7.

    you can also use commandline for this.

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

    Hope this helps...
    Happy Programming,

提交回复
热议问题