21

我们最近移动了服务器,现在曾经工作的闪存无法工作,因为它无法识别 xml 文件。这是详细的错误:

Server Error in Application

Internet Information Services 7.5 Error Summary HTTP Error 404.8 - Not Found The request filtering module is configured to deny a path in the URL that contains a hiddenSegment section. Detailed Error Information ModuleRequestFilteringModule NotificationBeginRequest HandlerStaticFile Error Code0x00000000 Requested URLhttp://obscured.xml Physical PathD:\home\obscured.xml Logon MethodNot yet determined Logon UserNot yet determined 
4

2 回答 2

30

该问题是由 IIS 保护您请求的文件引起的。

默认情况下,IIS 设置一个过滤器来拒绝对具有特定名称(例如 等)的文件的请求app_databin以保护 Web 应用程序。这是通过 IIS 中的隐藏段控件完成的。您的应用似乎受此影响。

理想情况下,您应该更改您请求的文件的名称。

但是,如果您不能这样做,请参阅此处的文章,了解如何删除它的步骤。

于 2012-12-27T18:32:59.247 回答
9

在我的例子中,我有一个应用程序,它有一个称为 bin 的业务对象。你能猜到发生了什么吗?我的 BinController 的 url 是http://localhost:6537/bin/index

显然,RequestFiltering 有一个条目拒绝访问 bin 文件夹,因此该请求甚至在到达 MVC 路由引擎之前就被阻止了。

我只是将我的控制器重命名为 BinsController 并且http://localhost:6537/bins/index 工作得很好。

于 2018-01-03T21:30:34.807 回答