3

I'm running the latest version of Glimpse and running the site locally shows the Glimpse bar bottom right but not when hosted on Azure.

I've done everything in this post which says to add the following to the web.config:

<glimpse defaultRuntimePolicy="On" endpointBaseUri="~/Glimpse.axd">
  <inspectors>
    <ignoredTypes>
      <add type="Glimpse.Mvc.Inspector.DependencyInjectionInspector, Glimpse.Mvc4"/>
    </ignoredTypes>
  </inspectors>
<runtimePolicies>
  <ignoredTypes>
    <add type="Glimpse.AspNet.Policy.LocalPolicy, Glimpse.AspNet"/>
  </ignoredTypes>
</runtimePolicies>
</glimpse>

The official docs don't mention the inspectors node but it doesn't work when I try without it either.

I tried adding:

<logging level="Trace" />

but can't see where that would be output.

When I go to glimpse.axd it correctly hides the warning message that I see on local:

Glimpse.AspNet.Policy.LocalPolicy *This policy means that Glimpse won't run remotely.*

Any ideas on a solution?

Community
  • 1
  • 1
KevinUK
  • 5,053
  • 5
  • 33
  • 49
  • 2
    by setting the loglevel to trace, a _glimpse.log_ file will be created inside the root of your web application and might then contain additional information on why the icon is still not shown. The _inspectors_ section is not needed for your case. The ignore of the _LocalPolicy_ type should do it. Do you see any kind of javascript errors in the browser console? – cgijbels Jul 20 '13 at 23:07
  • 2
    Thanks! That let me find out I needed to add @Html.GlimpseClient() in my _Layout.cshtml (with a using statement of Glimpse.Mvc.Html) which fixed the issue. – KevinUK Jul 21 '13 at 09:05

2 Answers2

4

As I was on MVC and Azure I needed to do both steps listed here.

Then in views/web.config add:

<add namespace="Glimpse.Mvc.Html" />
KevinUK
  • 5,053
  • 5
  • 33
  • 49
0

In your Web.config add the runtimePolicy as below.

<glimpse defaultRuntimePolicy="On" endpointBaseUri="~/Glimpse.axd" >
 <runtimePolicies>
    <ignoredTypes>
        <add type="Glimpse.AspNet.Policy.LocalPolicy, Glimpse.AspNet"/>
    </ignoredTypes>
 </runtimePolicies>
</glimpse>

And then add @Html.GlimpseClient() to the end of your Layout page.

No idea why this second part is necessary for remote and not local, but it worked for me.

Mr. Flibble
  • 26,564
  • 23
  • 69
  • 100