【发布时间】:2011-07-23 21:54:47
【问题描述】:
我刚刚在我的日志中注意到,如果有一个“。”在 .net 4 集成应用程序池上不存在的 url 末尾,iis 7.5 不显示您预设的 404 url,但默认未找到页面。
我在 iis 和 asp.net 设置中都有我的自定义 404 url。它适用于任何其他不存在的网址。
站点使用 .net 4 路由和 asp.net 网络表单。据我所知,这与路由无关,因为即使我尝试使用“site.com/djfdhfhgfhgfggfff”之类的随机网址。行为不会改变。
有人遇到过这种情况吗?
错误看起来像是来自 asp.net。上面写着
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /etc.
更新:刚刚完成了跟踪记录,看起来像是 global.asax 正在抛出它。
MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName global.asax
Notification 1
HttpStatus 404
HttpReason Not Found
HttpSubStatus 0
ErrorCode 0
ConfigExceptionInfo
Notification BEGIN_REQUEST
ErrorCode The operation completed successfully. (0x0)
【问题讨论】:
-
它可能因为点而通过 ASP.NET 处理程序路由,这意味着您的 ASP.NET 页面会引发此错误。 ASP.NET 有哪些通配符映射?
-
没有更改 iis 上与映射相关的任何内容。我在下面的路线上注意到了它,但是没有路线它也会做同样的事情 routes.MapPageRoute("tag", "tag/{Keyword}/{PageNumber}", "~/tags.aspx", false, new RouteValueDictionary { { "PageNumber", "1" } } );
标签: asp.net http-status-code-404 iis-7.5 asp.net-routing