Asp.net 浏览/bin时出现404错误
我在Windows Server 2008 R2上运行IIS 7.5。Asp.net 浏览/bin时出现404错误,asp.net,windows,iis,http-status-code-404,bin-folder,Asp.net,Windows,Iis,Http Status Code 404,Bin Folder,我在Windows Server 2008 R2上运行IIS 7.5。 当我浏览“/bin”文件夹时,发现一个404:file not found错误。我知道这是微软的安全策略 我试着按上面写的做,但没有解决问题。有什么想法吗 编辑: 应该注意的是,我没有安全问题。我在专用网络中运行IIS进行目录浏览。最终我需要对它执行爬网和索引。问题是由于404错误,“/bin”和“/AppConfig”下的页面未被爬网 我只需要解决这个问题。同样,这里没有相关的安全问题。 通过网络共享访问\bin文件夹,例
当我浏览“/bin”文件夹时,发现一个
404:file not found
错误。我知道这是微软的安全策略
我试着按上面写的做,但没有解决问题。有什么想法吗
编辑:应该注意的是,我没有安全问题。我在专用网络中运行IIS进行目录浏览。最终我需要对它执行爬网和索引。问题是由于404错误,“/bin”和“/AppConfig”下的页面未被爬网 我只需要解决这个问题。同样,这里没有相关的安全问题。
- 通过网络共享访问\bin文件夹,例如
\\myserver\mysite\bin
- 编写ashx处理程序或asmx web服务,为您扫描\bin文件夹并返回结果,例如
Directory.GetFiles(Server.MapPath(“~\bin”)
<configuration>
<system.webServer>
<security>
<requestFiltering>
<hiddenSegments applyToWebDAV="false">
<remove segment="Bin" />
</hiddenSegments>
</requestFiltering>
</security>
</system.webServer>
</configuration>
包含以下浏览器定义(.browser文件): ASP.NET用于识别各个浏览器并确定它们的 能力App\u浏览器
包含源代码 共享类和业务对象的代码App\u code
包含应用程序数据文件 包括.mdf数据库文件、XML文件和其他数据存储文件应用程序数据
包含已编译的资源(.resx和.resources文件) 进入具有全局作用域的程序集App\u全球资源
包含资源(.resx和 .resources文件)与特定页面关联,用户 控件或应用程序中的母版页App\u LocalResources
包含一个集合 文件(.skin和.css文件,以及图像文件和通用 定义ASP.NET网页外观和 控制应用程序主题
包含引用合同文件(.wsdl文件), 架构(.xsd文件)和发现文档文件(.disco和 .discomap文件),用于创建用于 应用程序App_WebReferences
包含控件、组件、, 或您希望在应用程序中引用的其他代码Bin
site.com/wp content/themes/theme/bin/
中,在这种情况下,此解决方案应该是完全可以接受的。
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.