Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Get Glimpse To Work On Remote IIS

I've tried everything I can think of, so I'm turning to SO. I can't get Glimpse to work on a remote IIS server. I'm using Glimpse 1.2 with ADO, ASP.NET, EF5, and Mvc4 extensions. Everything works wonderfully when I launch the web application locally using the VS development server. However, I can't seem to get the Glimpse icon to show up when deploying to our remote development server. Here's what I've tried and noticed:

  • I am ignoring the LocalPolicy in my web.config:

    <glimpse defaultRuntimePolicy="On" endpointBaseUri="~/Glimpse.axd">
        <inspectors>
            <ignoredTypes>
                <add type="Glimpse.Mvc.Inspector.DependencyInjectionInspector, Glimpse.Mvc4" />
                <add type="Glimpse.AspNet.Policy.LocalPolicy, Glimpse.AspNet"/>
            </ignoredTypes>
        </inspectors>
    </glimpse>
    
  • I am able to access /Glimpse.axd and press the enable button without issue

  • A cookie gets set with the content:

    glimpsePolicy
    On
    backofficetest/
    1088
    2027053056
    32990064
    3189135193
    30291671
    *
    
  • Turning on the Glimpse log does not show any error or warning messages. It generates the following for each request:

2013-04-11 12:43:06.8992 | DEBUG | RuntimePolicy set to 'Off' by IRuntimePolicy of type 'Glimpse.AspNet.Policy.LocalPolicy' during RuntimeEvent 'BeginRequest'.

  • Fiddler verifies that no calls are being made to any Glimpse-related resources during a request.

  • Nothing related to Glimpse appears in the page source.

I'm sure I've just missed a setting somewhere, but this is driving me nuts. Anyone have any ideas?

Thanks.

like image 573
daveaglick Avatar asked Apr 11 '13 17:04

daveaglick


2 Answers

You configuration needs to be updated, like so:

<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>

Runtime policies and inspectors are two different things and are configured in their own nodes.

like image 130
nikmd23 Avatar answered Sep 23 '22 06:09

nikmd23


Even I had a similar problem. It worked on my local machine, but when hosted on IIS it didnt work. I used nikmd23 code and it worked, later realized that only the <runtimePolicies> was required.

Here is what works for me :

<glimpse defaultRuntimePolicy="On" endpointBaseUri="~/Glimpse.axd">      
  <runtimePolicies>
    <ignoredTypes>
        <add type="Glimpse.AspNet.Policy.LocalPolicy, Glimpse.AspNet"/>
    </ignoredTypes>
  </runtimePolicies>
</glimpse>
like image 33
Yasser Shaikh Avatar answered Sep 22 '22 06:09

Yasser Shaikh