Documentation

Welcome to the Glimpse Documentation! Here we hope to introduce you to the various tutorials, concepts and APIs you might need when discovering and using Glimpse.

NOTE: Glimpse docs are currently being improved. If you'd like to help out, just edit this page or contribute to our GitHub Wiki

Troubleshooting

Having a problem with Glimpse? Here are a few common troubleshooting tips. If looking through these tips or the rest of the documentation doesn't fix your issue, and you think Glimpse could be causing the issue:

Debugging Glimpse

If you haven't been able to fix your problem, The first step is to enable Glimpse's internal logging mechanism, as described in the Logging section of Configuration. You can also debug Glimpse code by loading symbol files as described in Debugging with SymbolSource

Problem: Glimpse icon does not appear

If the Glimpse log file contains the warning:

Unable to locate '</body>' with content encoding '{response encoding}'. Response may be compressed.

Than ensure that the page contains a closed body tag (</body>). In situations where HTML content is compressed, Glimpse will be unable to find the required closed body tag. In these cases, Glimpse requires additional configuration.

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

For projects using ASP.NET WebForms, first register the Glimpse controls:

<%@ Register TagPrefix="glimpse" Namespace="Glimpse.AspNet.Controls" Assembly="Glimpse.AspNet" %>

then add the Client control to the end of .aspx or .master file:

    <!-- page/master contents -->
    <glimpse:Client runat="server"/>
  </body>
</html>

Problem: Glimpse does not work on remote servers

To run Glimpse on a remote server (like a server in Windows Azure), disable the LocalPolicy:

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

Problem: Getting Glimpse to work with manual created SQL Connections/Commands

To retrieve data for the SQL tab, Glimpse attaches itself by providing its own GlimpseDbProviderFactory which wraps the standard ones. This lets it collect information about how you're using your data connections.

If you're not using an ADO connection that uses the DbProviderFactories as part of its infrastructure, Glimpse won't collect any data for the SQL tab (out of the box). You can fix this by manually providing a Glimpse-wrapped IDbConnection.

To find out more about setting this up, read the following:

Question: How can I see the Post data in the case of the PRG scenario?

By default, Glimpse shows you the data associated with the last request (whether that be a Post or Get), you may not see binding information in Post/Redirect/Get scenarios - As the binding Information is associated with the original Post but then the following Get is what Glimpse will show.

In the near future (hopefully release v2 timeframe) we will make this experience better. In the mean time you can use the History tab to pull out the original Post request from the session.