Getting Glimpse/RouteDebugger to work on Cassini 404 pages?
Asked Answered
P

1

3

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.

Pellmell answered 29/4, 2011 at 19:36 Comment(0)
D
5

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.

Diggins answered 30/4, 2011 at 14:19 Comment(3)
That 200 status requirement would explain it for sure. I definitely had it on in the config. Since I already found the issue at the heart of this question, I just wanted to nail down the lack of Glimpse/RouteDebugger. Your answer definitely explains that.Pellmell
Glad to help out... hope Glimpse is providing useful.Diggins
Is there any way to get rid of this 200 code limitation and show it on error pages?Narrow

© 2022 - 2024 — McMap. All rights reserved.