让 Glimpse/RouteDebugger 在 Cassini 404 页面上工作?
我是否需要做任何额外的事情才能让 Glimpse 提供返回 Cassini 上默认 404 服务器错误页面的请求的详细信息?默认 404 页面是指“‘/’应用程序中的服务器错误”,并显示一条消息“找不到资源”(以及 HTTP 404 描述、请求的 URL 和版本信息)。
这个项目有一些相当复杂的路由,所以我毫不怀疑我与我想做的事情有冲突。我只是希望 Glimpse 提供尽可能详细的信息,为我指明解决问题的正确方向。
我通过 NuGet 在 MVC3 项目上加载了 Glimpse,我正在通过 Visual Studio 2010 的内置托管系统 (Cassini) 运行,并且在之前工作的操作方法及其生成的视图上一切正常。从那时起,我添加了另一个操作方法,事实证明该方法很难通过默认 URL 结构(例如,/controller/action?someparam=x)实现。因为我认为 Glimpse 路线数据对于确定这里出了什么问题非常方便,所以我在默认 404 页面的编码器中寻找眼球。 Glimpse 似乎并没有“附加”到这个结果。
更新:也不适用于 RouteDebugger。无论我出了什么问题,它在管道中的位置都足够高,似乎没有任何东西能够将自己固定到响应中。
更新:请求 URL 不起作用,因为我忘记了使用 [HttpPost]
设置了此操作。这完全解释了 404,但没有解释如何从发回的响应中的各个实用程序获取任何路由信息。
Do I need to do anything extra to get Glimpse to cough up details on a request that return the default 404 server error page on Cassini? By default 404 page, I mean the "Server Error in '/' Application" with a message of "The resource cannot be found" (as well as the HTTP 404 description, requested URL, and version info).
This project has some fairly complex routing, so I don't doubt I have something conflicting with what I am trying to do. I just want Glimpse to provide whatever details it can to point me in the right direction for fixing the problem.
I loaded up Glimpse via NuGet on an MVC3 project I am running through Visual Studio 2010's built-in hosting system (Cassini), and all works fine on previously working action methods and their resulting views. Since then, I added another action method that is proving difficult to hit via the default URL structure (e.g., /controller/action?someparam=x). Since I thought the Glimpse route data would be quite handy for determining what is going wrong here, I went looking for the eyeball in the corder of the default 404 page. Glimpse doesn't appear to be "attached" to this result.
UPDATE: Also doesn't work with RouteDebugger. Whatever I have wrong, it is high enough in the pipeline that nothing seems to be able to pin itself into the response.
UPDATE: The request URL wasn't working because I forgot I had this action set with [HttpPost]
. That completely explains the 404, but not how to get any route information from the various utilities on the response sent back.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就一瞥而言,它一开始没有显示的原因之一是我们只在 200 个成功结果上启用一瞥。因此,为什么眼球不会出现 404。
为什么它现在不显示...您是否已转到 /Glimpse/Config 页面并打开一瞥? Glimpse 默认情况下未启用,因此您必须明确将其打开。
让我知道进展如何。
As far as glimpse goes, one of the reason it wasn't showing in the first place is that we only enable Glimpse on 200 Success results. Hence why the eyeball wouldn't showup for a 404.
Why its not showing up now... have you gone to the /Glimpse/Config page and turned glimpse on? Glimpse isn't enabled by default, so you have to explicitly turn it on.
Let me know how it goes.