asp.net - Controller 工厂收到 "favicon.ico"的请求

标签 asp.net asp.net-mvc favicon unhandled-exception

我注意到使用Google Chrome和Visual Studio Development Server时,对"favicon.ico"的请求已传递到我的ASP .NET MVC Controller 工厂。 controllerType参数的值null毫无疑问会导致出现未处理的异常,由于错误日志,我只知道该异常。

有什么想法来自哪里请求以及为什么ASP .NET允许它到达 Controller 工厂?例如,CSS文件和图像已被正确过滤掉。

最佳答案

IIS7处于集成模式时,所有请求都通过隧道传输到管道。您可以将其添加到忽略路线

asp.net mvc does it handle all requests? - iis 7 integrated mode

另一种资源

http://weblogs.asp.net/gunnarpeipman/archive/2009/02/26/asp-net-mvc-ignore-requests-to-favicon-ico.aspx

请记住,您仅在 Debug模式下才看到此消息。您的用户不会看到它(仍然不是最佳选择,但是嘿,我没有设计它)

关于asp.net - Controller 工厂收到 "favicon.ico"的请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5507968/

相关文章:

javascript - 如何在 Action 完成之前显示加载图像 ASP.Net MVC 5

c# - 如何在View MVC4中显示相关表的数据?

css - 当 EnableOptimizations=false 时将 .less 输出为 .css

php - 使用 xpath 通配符获取 "icon"和 "shortcut icon"

java - 如何更改 Spring MVC 项目中的选项卡图标?

c# - 在运行时隐藏 Crystal 报表中的列?

asp.net - ASP.NET MVC5 中的复杂路由

c# - 传递给操作结果时如何绑定(bind)可变数量的列表项

html - 如何在 rails 中添加多个图标

asp.net - 确认电子邮件收到无效 token