asp.net怎么禁止网站根目录显示在那里配置
使用 http://localhost:1370/Index.aspx访问,手动将Index.aspx删除掉,点击回车,页面将会进入系统下面的根目录。
页面显示:
目录清单 -- /
--------------------------------------------
Monday, January 17, 2011 05:57 PM <dir> Admin
Wednesday, May 23, 2012 04:34 PM <dir> App_Data
Wednesday, May 23, 2012 04:27 PM <dir> bin
Monday, January 17, 2011 10:38 PM <dir> Css
Monday, January 17, 2011 05:57 PM <dir> FCKedit
Wednesday, May 23, 2012 04:26 PM <dir> Images
Monday, January 17, 2011 05:57 PM <dir> Js
Monday, January 17, 2011 05:57 PM <dir> obj
Monday, January 17, 2011 05:57 PM <dir> Properties
………………………………
我在web.config下面配置了
<!--<authentication mode="Windows"/>-->
<authentication mode="Forms">
<forms loginUrl="Index.aspx" name=".FormsAuthCookie"></forms>
</authentication>
<!--
但是只要手动删除就会出现,求高手解决。
------解决方案--------------------这个……貌似是iis的设置问题吧?
------解决方案--------------------要在iis中设置,把目录浏览的勾去掉