我有一個網站,我會像拒絕目錄瀏覽器從web.config文件。如何禁用在Web.Config中的目錄瀏覽
這裏我使用的代碼放置在ROOT中。 不起作用。我在本地測試它,因此使用URL LIKE http://localhost:3214/我仍然可以瀏覽CMS的目錄。
- 我在做什麼錯了?
- 即使在本地機器上它也能工作嗎?
感謝您的支持!
<configuration>
<location path="Cms">
<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>
</location>
</configuration>
一些資源:
http://www.expta.com/2008/03/configuring-virtual-directories-with.html
目前我在Visual Studio中使用內置服務器。你認爲可以在IIS上工作嗎? – GibboK 2011-04-05 09:00:48