[英]Error 404 on /bin browsing
Bin文件夹不是开发人员放置网页的地方。
在IIS 7.5中,您可以配置
同样可以通过web.config完成
<configuration>
<system.webServer>
<security>
<requestFiltering>
<hiddenSegments applyToWebDAV="false">
<remove segment="Bin" />
</hiddenSegments>
</requestFiltering>
</security>
</system.webServer>
</configuration>
无论如何,为了避免在开发服务器和任何部署服务器上出现问题,我认为最简单的解决方案是将该页面移动到另一个文件夹 。
在这里阅读:
ASP.NET recognizes certain folder names that you can use
for specific types of content.
The following table lists the reserved folder names and the type
of files that the folders typically contain.
Note
The content of application folders, except for the App_Themes folder,
is not served in response to Web requests,
but it can be accessed from application code.
App_Browsers
包含ASP.NET用于标识单个浏览器并确定其功能的浏览器定义(.browser文件)。 App_Code
包含共享类和业务对象的源代码 App_Data
包含应用程序数据文件,包括.mdf数据库文件,XML文件和其他数据存储文件。 App_GlobalResources
包含编译为具有全局范围的程序集的资源(.resx和.resources文件)。 App_LocalResources
包含与应用程序中的特定页面,用户控件或母版页关联的资源(.resx和.resources文件) App_Themes
文件(.skin和.css文件,以及图像文件和通用资源),用于定义ASP.NET网页和控件的外观。 App_WebReferences
包含参考合同文件(.wsdl文件),模式(.xsd文件)和发现文档文件(.disco和.discomap文件),可用于创建在应用程序中使用的Web引用。 Bin
包含要在应用程序中引用的控件,组件或其他代码的已编译程序集(.dll文件)。 \\\\myserver\\mysite\\bin
Directory.GetFiles(Server.MapPath("~\\bin"))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.