NullReferenceexception using glimpse

1.5k Views Asked by At

I found the following exception in my error log:

System.NullReferenceException: Object reference not set to an instance of an object.
at Glimpse.AspNet.RequestMetadata.get_ClientId()
at Glimpse.Core.Framework.GlimpseRequest..ctor(Guid requestId, IRequestMetadata   
   requestMetadata,  IDictionary`2 tabData, IDictionary`2 displayData, TimeSpan duration)
at Glimpse.Core.Framework.GlimpseRuntime.EndRequest()
at Glimpse.AspNet.HttpModule.EndRequest(HttpContextBase httpContext)
at Glimpse.AspNet.HttpModule.<Init>b__3(Object context, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.
       System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I'm running glimpse core v1.6, the following config: •Registered Tabs: ◦Other ◾Elmah - Glimpse.Elmah.Plugin

◦Glimpse.Ado (1.5.0)◾SQL - Glimpse.Ado.Tab.SQL

◦Glimpse.AspNet (1.4.0)◾Configuration - Glimpse.AspNet.Tab.Configuration
◾Environment - Glimpse.AspNet.Tab.Environment
◾Request - Glimpse.AspNet.Tab.Request
◾Routes - Glimpse.AspNet.Tab.Routes
◾Server - Glimpse.AspNet.Tab.Server
◾Session - Glimpse.AspNet.Tab.Session

◦Glimpse (1.6.0)◾Timeline - Glimpse.Core.Tab.Timeline
◾Trace - Glimpse.Core.Tab.Trace

 Want to create your own Tabs - see here!
•Runtime Policies: ◦Glimpse (1.6.0)◾Glimpse.Core.Policy.AjaxPolicy 
◾Glimpse.Core.Policy.ContentTypePolicy 
◾Glimpse.Core.Policy.ControlCookiePolicy 
◾Glimpse.Core.Policy.GlimpseResourcePolicy 
◾Glimpse.Core.Policy.StatusCodePolicy 
◾Glimpse.Core.Policy.UriPolicy 

EDIT: Some more info:

This is running on an Azure web site. While the uncaught exception gets logged (by Elmah), I don't think an error page every makes it's way to the end user.

2

There are 2 best solutions below

0
On

I just came across this issue today. Turns out it simply that I needed to update the Glimpse NuGet packages as I was using versions that were no longer supported by the newer MVC / ASP.NET technology.

After this, I got a runtime error relating to the System.Web.Mvc.Html reference in my Web.Config. This was subsequently fixed by Cleaning my solution then changing the "Copy Local" property against the System.Web.Mvc reference to True.

0
On

I had a similar problem.

After various checks, the problem was resolved by resetting Visual Studio settings.

Tools > Import and Export Settings