I was simply missing a <body>
tag in the HTML. The icon appears once I added the missing tag.
Glimpse icon does not appear
-
31-03-2022 - |
Question
I'm trying to use Glimpse for MVC 4. My issue is that, although I have followed the installation instructions on the Glimpse site, the Glimpse icon does not appear on my site.
Basically I created a new MVC 4 project and added NuGet package Glimpse.MVC4. Here is my web.config file:
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<section name="glimpse" type="Glimpse.Core.Configuration.Section, Glimpse.Core" />
</configSections>
<appSettings>
<add key="webpages:Version" value="2.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<httpRuntime targetFramework="4.5" />
<compilation debug="true" targetFramework="4.5" />
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
<!-- Glimpse: This can be commented in to add additional data to the Trace tab when using WebForms
<trace writeToDiagnosticsTrace="true" enabled="true" pageOutput="false"/> -->
<httpModules>
<add name="Glimpse" type="Glimpse.AspNet.HttpModule, Glimpse.AspNet" />
</httpModules>
<httpHandlers>
<add path="glimpse.axd" verb="GET" type="Glimpse.AspNet.HttpHandler, Glimpse.AspNet" />
</httpHandlers>
</system.web>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
<add name="Glimpse" path="glimpse.axd" verb="GET" type="Glimpse.AspNet.HttpHandler, Glimpse.AspNet" preCondition="integratedMode" />
</handlers>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="Glimpse" type="Glimpse.AspNet.HttpModule, Glimpse.AspNet" preCondition="integratedMode" />
</modules>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<glimpse defaultRuntimePolicy="On" endpointBaseUri="~/Glimpse.axd">
<!-- If you are having issues with Glimpse, please include this. It will help us figure out whats going on. -->
<logging level="Trace" />
</glimpse>
</configuration>
When I run my site, I navigate to http://localhost:12345/glimpse.axd
and click the Turn On Glimpse
button, which looks to create a cookie on my site (which I see via Chrome developer toolbar). When I navigate back to http://12345
I do not see any icon appear in the bottom right of the page, as described in the instructions.
I've looked at various StackOverflow questions about this scenario, but a lot mention the old /Glimpse/Config
way of doing things. As I've not done anything out of the ordinary, I'm wondering whether I've just missed a step?
EDIT:
Huh, I hadn't noticed I'd turned on the logging. OK, now things are clearer:
2013-04-02 21:42:09.5624 | DEBUG | get_Binders method of type 'System.Web.Mvc.Async.AsyncControllerActionInvoker' is not proxyable. |
2013-04-02 21:42:09.5624 | DEBUG | set_Binders method of type 'System.Web.Mvc.Async.AsyncControllerActionInvoker' is not proxyable. |
2013-04-02 21:42:09.5624 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.Async.AsyncControllerActionInvoker'. |
2013-04-02 21:42:09.6064 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IActionFilter'. |
2013-04-02 21:42:09.6064 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IResultFilter'. |
2013-04-02 21:42:09.6064 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IAuthorizationFilter'. |
2013-04-02 21:42:09.6064 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IExceptionFilter'. |
2013-04-02 21:42:09.6064 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IExceptionFilter'. |
2013-04-02 21:42:09.6364 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IValueProvider'. |
2013-04-02 21:42:09.6364 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IUnvalidatedValueProvider'. |
2013-04-02 21:42:09.6364 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IValueProvider'. |
2013-04-02 21:42:09.6364 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IUnvalidatedValueProvider'. |
2013-04-02 21:42:09.6504 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IValueProvider'. |
2013-04-02 21:42:10.0504 | DEBUG | Methods inspected via proxy generation hook on type 'System.Web.Mvc.IView'. |
2013-04-02 21:42:10.0504 | INFO | Replaced IView of type 'System.Web.Mvc.RazorView', named 'Index', with proxy implementation. |
2013-04-02 21:42:10.2524 | WARN | Unable to locate '</body>' with content encoding 'Unicode (UTF-8)'. Response may be compressed. |
2013-04-02 21:42:13.6916 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |
2013-04-02 21:42:15.0587 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. |
2013-04-02 21:42:17.4918 | INFO | Replaced IView of type 'System.Web.Mvc.RazorView', named 'Index', with proxy implementation. |
2013-04-02 21:42:17.4918 | WARN | Unable to locate '</body>' with content encoding 'Unicode (UTF-8)'. Response may be compressed. |
Solution