Glimpse running but not showing up

970 views
Skip to first unread message

Vincent Courcelle

unread,
Oct 6, 2013, 6:56:33 PM10/6/13
to getglim...@googlegroups.com
Hi,


I've installed Glimpse, but I can't make it appear (YES I did click on "turn glimpse on" and the message "Glimpse cookie set 'On'When you go back to your site, depending on your policies, you should see Glimpse at the bottom right of the page." appears on Glimpse.axd).
I'm running locally (using IISExpress).
I've a custom security policy: the policy runs correctly (I can see it when I put breakpoints in it). I tried to disable it or always returning RuntimePolicy.On but still nothing showing up.
By not showing up I mean I don't have the little "glimpse" box and nothing in the source code of the pages matching "glimpse".

I tried:
- uninstalling glimpse nuget packages and reinstalling, leaving the web.config as the package make it
- using another browser (initially no cookies)
- when I first tried glimpse few weeks ago it was working just fine, but I had to disable it for security consideration (I didn't had an auth provider at the time). I made many changes to the website since then, but I can't understand what's interfering.

Here is my web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="glimpse" type="Glimpse.Core.Configuration.Section, Glimpse.Core" />
</configSections>

<connectionStrings>
</connectionStrings>
<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" />
<add key="Airbrake.ApiKey" value="" />
<add key="Airbrake.Environment" value="Debug" />
<add key="Airbrake.ServerUri" value="http://api.airbrake.io/notifier_api/v2/notices" />
</appSettings>
<system.web>
<httpRuntime targetFramework="4.5" enableVersionHeader="false" />
<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>
<customErrors mode="RemoteOnly">
<error statusCode="404" redirect="~/Errors/Error404" />
<error statusCode="500" redirect="~/Errors/Error500" />
</customErrors>


<!-- 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>
<staticContent>
<remove fileExtension=".woff" /><!-- It might already exists in some environement -->
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />

<remove fileExtension=".svg" /><!-- It might already exists in some environement -->
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>
<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" />
<httpProtocol>
<customHeaders>
<clear />
<remove name="X-Powered-By" />
<add name="X-Frame-Options" value="DENY" />
</customHeaders>
</httpProtocol>


<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>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.6.5.0" newVersion="6.6.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="a4292a325f69b123" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.7.4137.9688" newVersion="1.7.4137.9688" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MongoDB.Bson" publicKeyToken="f686731cfb9cc103" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.8.3.9" newVersion="1.8.3.9" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MongoDB.Driver" publicKeyToken="f686731cfb9cc103" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.8.3.9" newVersion="1.8.3.9" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.5.0.0" newVersion="5.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.AspNet.SignalR.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.serviceModel>
<extensions>
<!-- In this extension section we are introducing all known service bus extensions. User can remove the ones they don't need. -->
<behaviorExtensions>
<add name="connectionStatusBehavior" type="Microsoft.ServiceBus.Configuration.ConnectionStatusElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="serviceRegistrySettings" type="Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</behaviorExtensions>
<bindingElementExtensions>
<add name="netMessagingTransport" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingTransportExtensionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="tcpRelayTransport" type="Microsoft.ServiceBus.Configuration.TcpRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="httpRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="httpsRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpsRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="onewayRelayTransport" type="Microsoft.ServiceBus.Configuration.RelayedOnewayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</bindingElementExtensions>
<bindingExtensions>
<add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="webHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WebHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="ws2007HttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WS2007HttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netTcpRelayBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netOnewayRelayBinding" type="Microsoft.ServiceBus.Configuration.NetOnewayRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netEventRelayBinding" type="Microsoft.ServiceBus.Configuration.NetEventRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netMessagingBinding" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</bindingExtensions>
</extensions>
</system.serviceModel>
<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" />-->
<tabs>
<ignoredTypes>
<add type="Glimpse.AspNet.Tab.Configuration, Glimpse.AspNet" />
<!-- Displays connections strings! -->
</ignoredTypes>
</tabs>
<runtimePolicies>
<ignoredTypes>
<add type="Glimpse.AspNet.Policy.LocalPolicy, Glimpse.AspNet"/>
</ignoredTypes>
<!--<contentTypes>
<clear />
<add contentType="text/html" />
</contentTypes>-->
</runtimePolicies>
</glimpse>
</configuration>



Thanks for your help!

Vincent Courcelle

unread,
Oct 6, 2013, 6:57:53 PM10/6/13
to getglim...@googlegroups.com
Sorry, I forgot to mention: I'm running ASP.NET MVC4 (correct packages are installed, Glimpse Core+Glimpse ASP.NET+Glimpse Mv4)

Vincent Courcelle

unread,
Oct 6, 2013, 8:30:00 PM10/6/13
to getglim...@googlegroups.com
Solved! <urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" /> was causing the issue...

Nik Molnar

unread,
Oct 7, 2013, 3:08:11 PM10/7/13
to getglim...@googlegroups.com
Sorry you had to work through that yourself Vincent.

You can use urlCompression if you want to, you just have to give Glimpse a little bit of help.

Here's the info you'll need: http://getglimpse.com/Help/Troubleshooting

Thanks,
Nik


On Sun, Oct 6, 2013 at 8:30 PM, Vincent Courcelle <vincent....@gmail.com> wrote:
Solved! <urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" /> was causing the issue...

--
You received this message because you are subscribed to the Google Groups "GetGlimpse-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to getglimpse-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Vincent Courcelle

unread,
Oct 7, 2013, 3:42:15 PM10/7/13
to getglim...@googlegroups.com
Hi Nik!
Thanks for the link!

I tried it and worked... almost like a charm. In fact when the entire page is not "cached" (ie no "[OutputCache]" on the controller's action), it works perfectly.

Things get tricky when using (full page) caching (not only when using compression+snippet): I'm using a Custom Policy (see http://pastebin.com/EGgENb8N
 ) that uses the Session to cache the fact the users can or cannot access Glimpse. But when the page is cached, the Session accessed in GlimpseSecurityPolicy is in fact the ORIGINAL session (I think the session that put the page in the cache or something). This is very dangerous as it can easily be unnoticed while leaving a huge potential security hole.

2 browsers, same Session (including session's id), first time I ever see this ^^ I haven't looked deeper, but it might be the entire httpContext which is the same -- even worst, because it wouldn't allow any custom auth on Glimpse if pages are cached (cookies based auth).

 

Cordialement,
Vincent Courcelle


--
You received this message because you are subscribed to a topic in the Google Groups "GetGlimpse-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/getglimpse-dev/ejsf0T9cr8Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to getglimpse-de...@googlegroups.com.

Vincent Courcelle

unread,
Oct 7, 2013, 5:41:50 PM10/7/13
to getglim...@googlegroups.com
Hi again Nik,

On the troubleshooting page you sent me, it's unclear if I need to put dynamicCompressionBeforeCache to false in any case or only not to have to insert the snippet "@Html.GlimpseClient()". In my case I left dynamicCompressionBeforeCache="true" and inserted the snippet in my _Layout page.

Here is the full quote of the page http://getglimpse.com/Help/Troubleshooting :

One possible scenario where HTML content is compressed is by using IIS URL Compression. One way this can be enabled is from the following Web.config setting:

<system.webServer>
  <urlCompression doDynamicCompression="true" dynamicCompressionBeforeCache="true" />
</system.webServer>

In this case, to get glimpse working you would set the value of the dynamicCompressionBeforeCache attribute to false.

For projects using ASP.NET MVC, add the GlimpseClient HtmlHelper to the end of the view or layout:

@Html.GlimpseClient()

 

Cordialement,
Vincent Courcelle


On Mon, Oct 7, 2013 at 12:08 PM, Nik Molnar <nik...@gmail.com> wrote:

Nik Molnar

unread,
Nov 12, 2013, 4:11:02 PM11/12/13
to getglim...@googlegroups.com
Hey Vincent,

You can always use the @Html snippet without worried.

If the compression is set to false Glimpse will auto-inject the @Html snippet for you.

So all in all, it's always safe to use @Html and will resolve the issue for you.

Thanks,
Nik


--
Reply all
Reply to author
Forward
0 new messages