Giter Club home page Giter Club logo

glimpse's Introduction

NOTE: Work on v2 of Glimpse has shifted to Glimpse/Glimpse.Prototype

The Diagnostics platform of the web Build Status

Providing real time diagnostics & insights to the fingertips of hundreds of thousands of developers daily

How does Glimpse help?

Once installed, Glimpse inspects web requests as they happen, providing insights and tooling that reduce debugging time and empower every developer to improve their web applications.

  • Visual Profiling - Glimpse profiles key server side activities and displays the timing of each in an easy to understand Gantt chart.
  • Transparent Data Access - Out of process database calls are expensive. Glimpse lists each of them, so excessive or under-performant queries can be reigned in.
  • View Rendering & Resolution - Glimpse provides complete visibility into ASP.NET MVC's view resolution process, including file access paths.
  • Route Debugging - ASP.NET routing is a powerful, and sometimes maddening, feature. Glimpse cracks into the black box and exposes how routes are matched.
  • Server Configuration - Know everything necessary about a request's origin server including: timezone, patch version, process ID and pertinent web.config entries.
  • Works For All Requests - Glimpse provides insights for not only the originating request, but also for AJAX requests, historical requests from the past and even requests made from other users.
  • ASP.NET WebForms Too - Glimpse ❤'s ASP.NET WebForms with the best View State decoder available embedded directly into the server control tree.
  • Improved Tracing - Glimpse automatically displays trace statements, eliminating the headache of digging through log files. Popular logging frameworks can be integrated with some slight configuration as well!

Where Does it Fit

Glimpse works where you need it to, how you want it to. Insights are presented in digestable summaries, with the ability to drill down to tackle tough problems.

  • Install via NuGet - Glimpse is installed with one simple NuGet command (Install-Package Glimpse) or with Visual Studio's manager package dialog.
  • Extensible & Configurable - Extend Glimpse via simple APIs and our 3rd party NuGet package ecosystem. Configure it on a whim with the ~/Glimpse.axd configuration builder and web.config.
  • Web Native - Glimpse is built with web technologies that you love: HTML, CSS & JS. It requires no proprietary browser plugin and works everywhere you do.
  • Hardened Security - Hardened by default, only you get to choose who can see what Glimpse data and when. Check out GlimpseSecurityPolicy.cs, already in your project, for more information and samples.
  • Lightweight & Fast - Glimpse's unique architecture makes it faster and less resource intensive than traditional profilers so you never have to sacrifice performance.
  • Unique Perspective - While F12 tools like Firebug and proxy debuggers like Fiddler are extremely useful, only Glimpse provides diagnostics from the perspective of your server.

Free & Open Source

Thanks to community contributions, Glimpse is thriving and growing. Glimpse is free and available under the Apache 2.0 license. The source code is available, so feel free to jump in and contribute!

Getting involved

Glimpse wouldn't be what it is today without the love and support of some awesome people from around the world. These contributions have ranged from simple bug fixes to fully fledged features, and from as far afield as South Africa and South East Asia.

If you would like to get involved, there are plenty of things that you can do. There are issues that are good for first-timers ringfenced and tagged Jump In in GitHub. If you'd rather start off on something more self-contained, why not write an extension?

  • Issues - Glimpse maintains several issues that are good for first-timers tagged as Jump In on GitHub. If one piques your interest, feel free to work on it and let us know if you need any help doing so.
  • New Features - For those looking to get more deeply involved, reach out to find out about our current efforts and how you can help.
  • Share Glimpse - If you love Glimpse, tell others about it! Present Glimpse at a company tech talk, your local user group or submit a proposal to a conference about how you are using Glimpse or any extensions you may have written.
  • Create an Extension - Get the best out of Glimpse by writing your own extension to expose diagnostic data that is meaningful for your applications. Creating extensions is easy, check the docs or reference an open source extension to get started.
  • Documentation - Documentation is a key differentiator between good projects and great ones. Whether you’re a first time OSS contributor or a veteran, documentation is a great stepping stone to learn our contribution process.
    • Contributing to Glimpse documentation is dead simple. To make it so easy, we're using Glimpse’s GitHub Wiki as the entry point for documentation - each page within the docs section of the site has a link to take you straight to the page where you can make changes directly. GitHub Wikis provide an online WYSIWYG interface for adding and editing the docs, completely in browser, using Markdown.

For more on getting involved see our contributor guidelines.

Need Help?

  • Issue List - Have you found a bug or something misbehaving? Tell us about it on our GitHub issue list and someone will help you as soon as possible.
  • Stack Overflow - Got general questions or just need a little support? Anything related to using, configuring or extending Glimpse can be asked at StackOverflow. View already answered questions for even faster support.
  • Mailing List - Got questions about how to extend or work on Glimpse, or just want to discuss a new feature idea? Shoot it through to the developers mailing list.

More information about Glimpse can be found at getGlimpse.com


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

glimpse's People

Contributors

avanderhoorn avatar bholdt avatar bryanjhogan avatar cgijbels avatar dahlbyk avatar dominiqueplante avatar flcdrg avatar grahammendick avatar grzmiel avatar hahndorf avatar jeffora avatar kellystuard avatar kendallb avatar khellang avatar lohithgn avatar maartenba avatar misterjames avatar nikmd23 avatar nycdotnet avatar odetocode avatar paulatkins avatar pltaylor avatar rho24 avatar richvdh avatar samjudson avatar schotime avatar scottguymer avatar sorenhl avatar stevenlauwers22 avatar taylan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glimpse's Issues

Sanitizer not working correctly

if I have some text like so.

[hi] [byte]

that i want to trace then it gets displayed like

[hi> [byte>

It looks like its happening in the sanitizer. I will have a look.

Property injection does not work when Glimpse is installed

I use property injection via ServiceLocator for my ActionFilterAttributes that have dependencies. When I install Glimpse, these dependencies are never resolved, as my custom ControllerFactory is never invoked. If Glimpse hijacks the running application's ControllerFactory, it should provide a CompositeControllerFactory, add itself as the first, and any subsequent custom factories after, so that we can continue to extend our applications.

HttpRequestValidationException being thrown when posting html

With Glimpse enabled, I'm getting a HttpRequestValidationException when I post pure html to an action.
The action has a [ValidateInput(false)] attribute and functions normally when Glimpse is uninstalled.

Here is a glimpse (pun intended) of the stack trace. Seems like a model binding issue:

[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (Publishable.Content[0].Body="<p><img src="/upload...").]
   System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) +8755668
   Microsoft.Web.Infrastructure.DynamicValidationHelper.<>c__DisplayClass12.<ReplaceCollection>b__d(String value, String key) +79
   Microsoft.Web.Infrastructure.DynamicValidationHelper.LazilyEvaluatedNameObjectEntry.ValidateObject() +89
   Microsoft.Web.Infrastructure.DynamicValidationHelper.LazilyValidatingHashtable.get_Item(Object key) +54
   System.Collections.Specialized.NameObjectCollectionBase.FindEntry(String key) +20
   System.Collections.Specialized.NameValueCollection.GetValues(String name) +8
   System.Web.Mvc.ValueProviderResultPlaceholder.GetResultFromCollection(String key, NameValueCollection collection, CultureInfo culture) +20
   System.Web.Mvc.<>c__DisplayClass4.<.ctor>b__0() +16
   System.Lazy`1.CreateValue() +361
   System.Lazy`1.LazyInitValue() +9591042
   System.Lazy`1.get_Value() +89
   System.Web.Mvc.NameValueCollectionValueProvider.GetValue(String key, Boolean skipValidation) +68
   System.Web.Mvc.NameValueCollectionValueProvider.GetValue(String key) +12
   Glimpse.Net.Plumbing.GlimpseValueProvider.GetValue(String key) +64
   System.Web.Mvc.ValueProviderCollection.GetValueFromProvider(IValueProvider provider, String key, Boolean skipValidation) +36
   System.Web.Mvc.<>c__DisplayClass9.<GetValue>b__4(IValueProvider provider) +33
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +151
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +177
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +4187840
   System.Web.Mvc.ValueProviderCollection.GetValue(String key, Boolean skipValidation) +272
   System.Web.Mvc.DefaultModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +385

Glimpse URL not resolved on remote servers

I want to use Glimpse, it is GREAT!!! but other than my local machine I cannot get it to work - PLEASE HELP.

On my local machine I can browse to jack.com/Glimpse/Config This works because I have jack.com (this DNS entry does not belong to me) in c:\windows\system32\drivers\etc\hosts as follows:
127.0.0.1 jack.com

We have a dev, QA and production environment and I want it to work on them too, there is where I get the most value from Glimpse. I know it is a production risk and will place /Glimpse/Config behind a secure login for Administrators roles only.

All servers are .Net 4 and MVC 3 and I use Firefox 4. When I browse to http://p2.qa.mysite.com/Glimpse/Config I just get a 404 I do not use the hosts file trick like on my local machine and the site IP is resolved via our DNS servers.

On that qa server I browse to the web.config and I have in the config section:
section name="glimpse" type="Glimpse.Net.Configuration.GlimpseConfiguration"
and lower down:
glimpse on="true" saveRequestCount="5"
ipAddresses
add address="127.0.0.1"
add address="111.111.111.111"
!--IPv4--
add address="::1"
!--IPv6--
ipAddresse
contentTypes
add contentType="text/html"
contentTypes
glimpse

I changed the IP to 111.111.111.111 here because my boss will put my ass in a sling if I publish site info like that. I also changed our site domain name to mysite.com here for the same reason.

If I RDP to the QA server the following URL: http://localhost/Glimpse/Config does work.

What am I doing wrong and how can I debug this? I did log this issue and did get a response but that stopped after I accidentally closed and then quickly re-opened the issue on github.com Why does this URL not resolve on any of the servers?

Javascript error when click on Glimpse Icon

I have just installed Glimpse on my Windows 7 x64 development machine to use on a new MVC 3 project using NuGet. Everything seems to have installed correctly but when I run the app and click on the Glimpse icon in the corner I am getting a javascript error. If I tell VS2010 to break into the error, it breaks into the glimpseClient.js file in the "cookie: function(key, value) " function at line 281 "value = $.isPlainObject(value) ? JSON.stringify(value) : String(value);".

Can anyone help with this issue? I am sure it is something that I am doing...

Orgbrat

Unable to load one or more of the requested types.

Just installed Glimpse from NuGet and I an getting the following exception.
The project is an MVC3 site with EF4.0 running on my development machine, Windows 7 64bit.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

StackTrace:
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
System.Reflection.RuntimeModule.GetTypes() +14
System.Reflection.Assembly.GetTypes() +75
System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog() +114
System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition) +11
System.ComponentModel.Composition.Hosting.<>c__DisplayClass1.b__0(ComposablePartCatalog catalog) +17
System.Linq.d__142.MoveNext() +183 System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) +220 System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable1& exports) +39
System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition) +51
System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) +138
System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable1& exports) +39 System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable1& exports) +47
System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) +46
System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable1& exports) +39 System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition) +51 System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(ExportProvider provider, ComposablePart part, ImportDefinition definition, AtomicComposition atomicComposition) +48 System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSubset(PartManager partManager, IEnumerable1 imports, AtomicComposition atomicComposition) +160
System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part) +395
System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(PartManager partManager, ComposablePart part, Boolean shouldTrackImports) +206
System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImports(ComposablePart part) +125
System.ComponentModel.Composition.Hosting.<>c__DisplayClass2.b__0() +19
System.ComponentModel.Composition.Hosting.CompositionServices.TryInvoke(Action action) +42
System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Compose(CompositionBatch batch) +806
System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(CompositionBatch batch) +47
System.ComponentModel.Composition.AttributedModelServices.ComposeParts(CompositionContainer container, Object[] attributedParts) +193
Glimpse.Net.Module.ComposePlugins() +143
Glimpse.Net.Module.Init(HttpApplication context) +75
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +398
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +203
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +293
System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context) +56
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +173

[HttpException (0x80004005): Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +90
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +172

Problems With Glimpse

Hi Guys,

I installed and configured the app.

When I run my APP, I can see the eye Icon. However, nothing happens when I click it.

I test it in almost every major browser
.
Only In FireFox 4 when I refresh the page or click on a link, I get an EMPTY Popup every time. This popup goes away when uninstall Glimpse.

Some specs:
• Visual Studio 2010
• ASP.net framework 4.0
• MVC 3.0
• Windows 7
• IIS 7.5

Thanks!

Edgar

0 bytes returned when controller content type is text/css and gzipped

I have 2 controllers that do similar things: Minify and compress CSS and Javascript files on the fly, store them in the cache, then return the output to the browser. When glimpse is turned on, and minification is turned on, the CSS controller returns 0 bytes.

In Chrome I get the following error: Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.

There is very little difference between the javascript, and the CSS controller, the only real difference is content type. Both of them are gzipped.

When I remove the gzip attribute, it works as normal.

Here are the headers that are returned to the browser when the CSS controller is called (gzip + minify enabled):

HTTP/1.1 200 OK
Cache-Control: public
Transfer-Encoding: chunked
Content-Type: text/css; charset=utf-8
Content-Encoding: gzip
Expires: Sun, 01 May 2011 00:05:42 GMT
Last-Modified: Thu, 21 Apr 2011 00:05:42 GMT
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 21 Apr 2011 00:05:42 GMT

Here are the headers that are returned to the browser when the Javascript controller is called (gzip + minify enabled):

HTTP/1.1 200 OK
Cache-Control: public, max-age=86400
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Expires: Fri, 22 Apr 2011 00:06:46 GMT
Last-Modified: Thu, 21 Apr 2011 00:06:46 GMT
Vary: *
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 21 Apr 2011 00:06:56 GMT
Content-Length: 170550

Object reference not set to an instance of an object.

I just added Glimpse to my MVC3 project which makes use of dependency injection for Controllers and ActionFilters. While trying to view the home page I receive an object reference exception, the stack trace is as follows:

[NullReferenceException: Object reference not set to an instance of an object.]
Glimpse.Net.Plumbing.GlimpseFilterCallMetadata..ctor(String category, Guid guid, String method, Filter innerFilter, Boolean isChild) +101
Glimpse.Net.Plumbing.GlimpseActionInvoker.GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +916
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +184
Glimpse.Net.Plumbing.GlimpseActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +8
System.Web.Mvc.Controller.ExecuteCore() +158
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +334
System.Web.Mvc.<>c__DisplayClassb.b__5() +61
System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +19
System.Web.Mvc.<>c__DisplayClasse.b__d() +53
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +452
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +370

Please let me know if you need additional information.

Thanks,
Ryan

glimpse warning not so clear

Hi,
i have created a new asp net mvc3 project "for intranet" and added via NuGet glimpse.
When i start the application in the glimpse tab i see the warnings listed above that are not so clear can you explain me? thanks F.

NotADefaultModelBinderWarning System.Web.Mvc.HttpPostedFileBaseModelBinder is not a System.Web.Mvc.DefaultModelBinder.
NotADefaultModelBinderWarning System.Web.Mvc.ByteArrayModelBinder is not a System.Web.Mvc.DefaultModelBinder.
NotADefaultModelBinderWarning System.Web.Mvc.LinqBinaryModelBinder is not a System.Web.Mvc.DefaultModelBinder.
NonProxyableMemberWarning get_Binders method of System.Web.Mvc.DefaultModelBinder type is not proxyable.
NonProxyableMemberWarning set_Binders method of System.Web.Mvc.DefaultModelBinder type is not proxyable.
NonProxyableMemberWarning GetFilteredModelProperties method of System.Web.Mvc.DefaultModelBinder type is not proxyable.
NonProxyableMemberWarning GetType method of System.Web.Mvc.DefaultModelBinder type is not proxyable.
NonProxyableMemberWarning MemberwiseClone method of System.Web.Mvc.DefaultModelBinder type is not proxyable.
NonProxyableMemberWarning get_Binders method of System.Web.Mvc.ControllerActionInvoker type is not proxyable.
NonProxyableMemberWarning set_Binders method of System.Web.Mvc.ControllerActionInvoker type is not proxyable.
NonProxyableMemberWarning GetType method of System.Web.Mvc.ControllerActionInvoker type is not proxyable.
NonProxyableMemberWarning MemberwiseClone method of System.Web.Mvc.ControllerActionInvoker type is not proxyable.
NotProxyableWarning Cannot create proxy of Castle.Proxies.ControllerActionInvokerProxy. Object must have a parameterless constructor, cannot be sealed, and cannot already be a proxy object.

Not working with Virtual Directories in IIS due to fixed path

Hi,

Everything seemed to install fine, but no joy.

I noticed it inserts the following before the end body tag:

<script type="text/javascript" id="glimpseClient" src="/Glimpse/glimpseClient.js"></script>

My application is not in the root of the website, it is installed in a Virtual Directory, so this path would be /SITE/Glimpse/glimpseClient.js

Is there currently a way of overcoming this?

TIA

NHibernate Lazy Load Exception

A website using ASP.NET MVC 3 and NHibernate will throw a "Could not initialize proxy - no Session" LazyLoadException with Glimpse active when a page uses a NHibernate model as part of its view model.

Usage problems

Hello.I'm creating a new web forms application.Then i Install-Package Glimpse in order to install it.Installation completes just fine.But then i cannot browse to http://localhost:1325/Glimpse/config
I get 404 error.
Any ideas please?
I really want to give it a try.Thank you!

'jQuery' is undefined when using an async script loader

Hey there guys,

I'm currently using yepnope.js on my site to do async/conditional resource loading. One of the scripts that I have yepnope loading is jQuery which means jQuery is not loaded when the page is done rendering.

Due to this, I receive the following JavaScript error when hovering over the Glimpse eye: 'jQuery' is undefined.

Possible fix: add an option in which you can configure Glimpse to not automatically output Glimpse.js that way the developer can detect whether Glimpse is enabled and add the appropriate logic to reference the Glimpse.js script.

Let me know if you need any other additional information.

Thanks,
Ryan

Typos

XHReqest --> XHRequest

XHReqest > Druration --> Duration

Glimpse traversing Model properties

I have a Model with one of the property to be a lazy load or derived property like this:

public class People
{
public Guid Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string FullName {
get {
return FirstName + " " + LastName;
}
}
public List Friends {
get {
// to do later
throw new NotImplementedException();
}
}
}

In my view, I only display FirstName and LastName (NOT FullName nor Friends) - and everything works correctly. When I use Glimpse, for some reason, I start to get the "NotImplemented" exception thrown by the Friends property - although my code (controller or view never call it). If I remove Glimpse, my app works again flawlessly.

So is Glimpse doing this intentionally?

Feature Request

Great tool,

However I'd love to use this at work but I can already see a features we would need to have before being able to use this.

Ability to disable information shown.. example, config, I can already see clients barking about a security issue with showing it, even though its restricted to ip.

Here is a few others I'd like to see.

App Settings is truncated, would be nice to see a + to expand to see everything..

A circular reference was detected while serializing an object

This looks very interesting but when I try it I get this error (when glimpseState = On):

Server Error in '/' Application.

A circular reference was detected while serializing an object of type '[EDITED].Models.Medium'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: A circular reference was detected while serializing an object of type '[EDITED].Models.Medium'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: A circular reference was detected while serializing an object of type '[EDITED].Models.Medium'.]
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1478
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.SerializeEnumerable(IEnumerable enumerable, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +126
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1311
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +502
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1355
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +502
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1355
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +502
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1355
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.SerializeEnumerable(IEnumerable enumerable, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +126
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1311
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +502
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1355
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +502
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1355
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.SerializeEnumerable(IEnumerable enumerable, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +126
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1311
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.SerializeEnumerable(IEnumerable enumerable, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +126
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1311
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.SerializeDictionary(IDictionary o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +505
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +1250
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat) +26
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat) +74
Glimpse.Net.Responder.GlimpseResponders.StandardResponse(HttpApplication application, Guid requestId) +62
Glimpse.Net.Module.PreSendRequestHeaders(Object sender, EventArgs e) +105
System.Web.SendResponseExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +216
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

I cannot make it work

I dowloaded the nuget package and run my web site
However I can not see anything in the bottom right hand corner of my site
Looking in the source code generated, I can see it added a lot of things to my code and notably namespaces
The source code ends with this line
script type='text/javascript' id='glimpseClient' src='/Glimpse/glimpseClient.js'>/script

But there is no eye icon in the bottom right hand corner
Any help to make this work?

Returning json

If i return json from my server request (and json only), the glimpse json gets appended to the response as json, hence i get my json result and the json from glimpse appended to it. Any ideas?

Yellow Screen of Death

I had an existing MVC3 application based on the standard MVC 3 template (Home/About). I NuGetted (NuGot?) Glimpse and now when I run the application I get a YSoD.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
System.Reflection.RuntimeModule.GetTypes() +4
System.Reflection.Assembly.GetTypes() +78
System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog() +113
System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition) +10
System.ComponentModel.Composition.Hosting.<>c__DisplayClass1.b__0(ComposablePartCatalog catalog) +17
System.Linq.d__142.MoveNext() +238 System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) +125 System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable1& exports) +39
System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition) +35
System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) +139
System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable1& exports) +39 System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable1& exports) +28
System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) +45
System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable1& exports) +39 System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition) +35 System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(ExportProvider provider, ComposablePart part, ImportDefinition definition, AtomicComposition atomicComposition) +47 System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSubset(PartManager partManager, IEnumerable1 imports, AtomicComposition atomicComposition) +177
System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part) +479
System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(PartManager partManager, ComposablePart part, Boolean shouldTrackImports) +237
System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImports(ComposablePart part) +113
System.ComponentModel.Composition.Hosting.<>c__DisplayClass2.b__0() +18
System.ComponentModel.Composition.Hosting.CompositionServices.TryInvoke(Action action) +42
System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Compose(CompositionBatch batch) +781
System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(CompositionBatch batch) +35
System.ComponentModel.Composition.AttributedModelServices.ComposeParts(CompositionContainer container, Object[] attributedParts) +189
Glimpse.Net.Module.ComposePlugins() +230
Glimpse.Net.Module.Init(HttpApplication context) +109
System.Web.HttpApplication.InitModulesCommon() +135
System.Web.HttpApplication.InitModules() +97
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +759
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +356
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +225
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +398

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Getting this error while attempting to navigate to the home page of my project. It works on most of the other pages I've tried, just not the home page.

Stack trace follows:

[InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.]
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat) +571061
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat) +74
Glimpse.Net.Responder.GlimpseResponders.StandardResponse(HttpApplication application, Guid requestId) +62
Glimpse.Net.Module.PreSendRequestHeaders(Object sender, EventArgs e) +105
System.Web.SendResponseExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +216
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Synchronous jQuery ajax fails

I enabled Glimpse on my site and started getting js errors indicating my jQuery $.ajax calls were failing. Looking in firebug, they are actually returning the correct data with a '200 OK' status. The problem is that it's always firing the error function when the ajax call is done.

I narrowed this down to the fact that I have 'async: false' set for the call. If I comment that line out, the call works fine without any error.

Here is my ajax call:

$.ajax({
            url: options.url,
            type: "GET",
            data: data,
            dataType: "json",
            cache: true,
            async: false,
            error: function (error) {
                alert("Something unknown happened fetching table data.  Please refresh the page." + error);
            },
            success: function (response) {
                jsonData = response;
            }
        });

So it seems like Glimpse is interfering somehow with synchronous ajax calls.

glimpseClient.js 404 in WebForms applications

As I mentioned here: #28 (comment)

the DynamicModuleUtility.RegisterModule() method registers the Glimpse module as a managed module. If the runAllManagedModulesForAllRequests isn't set to true, then the module doesn't get called for .js requests, which leads to the 404.

The .NET 4 ASP.NET Empty Web Application template does not include that setting in the default web.config, and neither did the older 3.5 templates. There are likely a lot of WebForms apps out there that don't have that setting enabled in their web.config files. I know that ran into this problem myself at work.

I can think of a couple different ways this could be resolved, but it seems like the simplest would be to add the runAllManagedModulesForAllRequests setting to the web.config.transform file. At the very least, something should be added to glimpse.readme.txt to point out this requirement if it can't be resolved in any other manner.

Glimpse does not invoke actions correctly when in an AsyncController

Glimpse overrides the default actioninvoker with the GlimpseActionInvoker. However, when the action is an async action in an AsyncController, the correct action is not found. It looks like there will need to be a new GlimpseAsyncActionController that inherits from AsyncActionController to resolve this issue.

Plugins initialized twice

After upgrading to v0.78 of Glimpse I find that my plugin initialization is being run twice (see pull request #16 for the plugin). I think this was always the case, but since the new GlimpseDependencyResolver was added to v0.78 my plugin can't detect that it's already been initialized (at least not in the same way as before).

Doing some debugging it appears that Module.Init() is being called multiple times. I don't know why, but it probably has to do with Modules being initialized multiple times.

Issues with Glimpse and Automapper?

I only get the following 2 issues when Glimpse is installed. If I uninstall it, all is calm in my world (but I don't have the kick ass glimspe features) :( Hope this helps you find any bugs.

System.Collections.Generic.KeyNotFoundException crossed a native/managed boundary
Message=The given key was not present in the dictionary.
Source=mscorlib
StackTrace:
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at AutoMapper.PropertyBehaviorInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.IEmployeeProxy.get_Schools()

InnerException:

System.NotSupportedException crossed a native/managed boundary
Message=Specified method is not supported.
Source=System.Web
StackTrace:
at System.Web.HttpResponseStream.get_Position()
at System.Drawing.UnsafeNativeMethods.ComStreamFromDataStream.Seek(Int64 offset, Int32 origin)

InnerException:

'JOSN' is Undefined error

Hi there,
Thanks for such a useful project. I am getting a error when starting up Glimpse and when moving between tabs. I am using version 0.78. I am using IE8 and visual studio 2010. Please let me know if you need further details as I have a screen dump of the error and happy to email it to you.

Incorrect Glimpse url in readme?

Just trying Glimpse (0.80) for the first time, via NuGet . Glimpse.readme.txt says to hit

[http://yoursite.com]/Glimpse/Config/

Which doesn't work me for (404). However, the following url does:

[http://yoursite.com]/Glimpse/Config

(note the missing slash at the end).

Can't get to work and can't get clues what is going on

Hi,
I'm trying to integrate glimpse into existing mvc3 project and could not get it to work.

  1. I can't access config page (404)
  2. Strangely enough, I get javascript after html closing tag in chrome, but not in firefox 4. In chrome i get this:
<script type='text/javascript' id='glimpseData' data-glimpse-requestID='630262f7-46c4-4eac-a774-f94ebd474372'>var glimpse = {}, glimpsePath = '/';</script><script type='text/javascript' id='glimpseClient' src='/Glimpse/glimpseClient.js'></script>

But i see no eye in any browser
3) Empty asp.net mvc 3 works fine with glimpse, so something in my project is preventing glimpse from working correctly. Question is what exactly, there's too much stuff that can influence and it's not that easy to isolate issue. May be someone could point me what clues i should search for?

Glimpse only works locally

With very little effort I have been able to get Glimpse to work on my local machine. The true value however is to get it to work in our development and qa environments.

I have exactly the same webconfig as on my local machine and I can see the Glimpse.Net.dll in the bin folder. I have numerous sites on those servers so I have to play a little with my hosts files. I would have dev.mysite.com in my c:\windows\system32\drivers\etc\hosts file and point it to the ip. Might this be why I cannot get Glimpse to load?

I have IIS7 running and am trying to load it in Firefox 4. Also MVC3

"The view 'Index' or its master was not found.." v0.77 on Orchard MVC

I downloaded Orchard.Web.1.1.30 and installed Glimpse 0.77 via NuGet and I get the error below.
When I uninstall Glimpse it works fine.
I believe it should work as Orchard runs on MVC3?

Thanks.
The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:

Source Error:

Line 146: public void EndProcessRequest(IAsyncResult result) {
Line 147: try {
Line 148: _httpAsyncHandler.EndProcessRequest(result);
Line 149: }
Line 150: finally {

Source File: C:\Users\Danny\Downloads\Orchard.Source.1.1.30\src\Orchard\Mvc\Routes\ShellRoute.cs Line: 148

Stack Trace:

[InvalidOperationException: The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:]
System.Web.Mvc.ViewResult.FindView(ControllerContext context) +495
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +208
System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +39
Glimpse.Net.Plumbing.GlimpseActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +138
System.Web.Mvc.<>c__DisplayClass1c.b__19() +60
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +391 System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +61 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +285
Glimpse.Net.Plumbing.GlimpseActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +47 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +830 Glimpse.Net.Plumbing.GlimpseActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +46 System.Web.Mvc.Controller.ExecuteCore() +135 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +232 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +39 System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +68 System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +44 System.Web.Mvc.Async.<>c__DisplayClass81.b__7(IAsyncResult _) +42
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +141
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +54
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
System.Web.Mvc.<>c__DisplayClasse.b__d() +61
System.Web.Mvc.SecurityUtil.b__0(Action f) +31
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +56
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +110
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +38
Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in C:\Users\Danny\Downloads\Orchard.Source.1.1.30\src\Orchard\Mvc\Routes\ShellRoute.cs:148
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +690
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +194

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

jQuery.noConflict prevents UI from loading

Hi,
whenever I try to use glimpse in any environment with jQuery.noConflict() activated I get a javascript error. Is there any way to configure glimpse to work when noConflict is activated?

Many thanks for your help!

Cheers!

Roberto.

Work around: Circular reference whilst serializing Json object

Hi guys,

I have an interesting problem in that Glimpse only works on some of my MVC views and not all. To investigate, I downloaded the source and stepped through the code. I discovered the following:

  1. All pages that glimpse did not work on used EF models that had lazy loading implemented. The models being passed to the view were actually dynamically created proxies.

  2. Glimpse was failing in the StandardResponse method of the Glimpse.Net.Responder.GlimpseResponders class. The line causing the failure was this:

var json = JsSerializer.Serialize(data);

This threw the following error:

A circular reference was detected while serializing an object of type 'System.Data.Entity.DynamicProxies.Client_FDB5F48087CC77B34E5016C1C43E3E669337DFF7C1AD9BD4607161CA6B664115'

  1. I did a bit of searching about (mainly stackoverflow) and it turns out EF dynamic proxies can be trickey to serialise.

  2. I was able to work around the issue by using a DTO instead, so in the above example, I simply mapped the client EF model to a client viewmodel and passed that to the view instead (what I should have been doing in the first place to be honest).

Hope this info helps you.

p0pm0nkee

PS. Great tool by the way!!

Binder plugin overwrites my binder with GlimpseDefaultModelBinder using NInject

Hi, I've started using Glimpse today so maybe I'm wrong about this or occurs only in my configuration.

I user NInject in my MVC application and my MvcApplication class extends Ninject.Web.Mvc.NinjectHttpApplication. I override OnApplicationStarted and set ModelBinders.Binders.DefaultBinder to my custom implementation.

I've noticed that biding was broken after adding Glimpse to my project. I looked inside Glimpse source code and found that in the Binders plugin the DefaultBinder gets replaced if it's not a GlimpseDefaultModelBinder


if (!(ModelBinders.Binders.DefaultBinder is GlimpseDefaultModelBinder))
    ModelBinders.Binders.DefaultBinder = new GlimpseDefaultModelBinder();

Is this the intended behavior or should it be replaced by a wrapper ?


if (!(ModelBinders.Binders.DefaultBinder is GlimpseDefaultModelBinder))
{
    if (ModelBinders.Binders.DefaultBinder == null)
        ModelBinders.Binders.DefaultBinder = new GlimpseDefaultModelBinder();
    else
        ModelBinders.Binders.DefaultBinder = new GlimpseModelBinder(ModelBinders.Binders.DefaultBinder);   
}  

Incompatibility with Spark View Engine?

When using Glimpse in a project with the Spark view engine, then I get this error:

Unable to cast object of type 'Glimpse.Net.Plumbing.GlimpseView' to type 'Spark.ISparkView'.

Setup:

  • Glimpse 0.78
  • Spark 1.5.1 (compiled against MVC 3/.NET 4)
  • SparkViewEngine is registered on Application_Start (no other view engines are registered)

Better reporting when jquery is missing

I have an MVC 3 site that does not use any JavaScript and therefore had no Jquery.
I installed glimpse using nuget and it was possible to navigate to /glimpse/config, there it shows

glimpseState = On, 

but on my pages I didn't see the glimpse icon because of course the whole thing does not work without jquery, so it was not ON.

I guess, an MVC site without jquery is not to likely these days, but if you expand to other platforms, it may not always be there.
So a quick check should help, even displaying an alert("").

Glimpse client window hidden by Silverlight control

I have an application built using ASP.NET MVC and Silverlight. The Silverlight client app calls MVC controller actions to retrieve data from the server. It would be really handy to use Glimpse to see the calls that Silverlight is making to the server and what is being returned. I'm currently using Fiddler which is a little heavy handed. The only problem is that the Silverlight control hides the Glimpse client window. I'm not sure how easy this is to fix.

Cannot use in IE 9 or Chrome - no "Eye" icon

In IE 9 and Chrome 11, no Eye icon appears, so there seems to be no way to open or display the tool.

In FF 3.6, the icon is just a plain gray box in the lower right corner, but at least it's clickable...

Infinite redirect when Glimpse is on

I am using IE9 and a root IIS 7.5 site with port (http://localhost:xxx). ASP.NET MVC 3. I turn Glimpse on and all it does is infinitely redirect me... I am not sure where to but my site doesn't load.

I am wondering if it has to do with the fact I include all my JS at the bottom of the page, just before the <body> tag. Using jQuery 1.5.2.

Ideas?

PS. It would be nice to have a "Turn Glimpse Off" bookmarklet. I created my own but it took me several minutes to create a .url for IE.

Does this work?

I have seen other issues posted but no resolution. I simply created a new blank MVC 3 project, installed Glimpse,and ran it in debug mode. Nothing. I get a 404 when I try to get to localhost:/glimpse/config. I can send you the copy of the blank solution if it helps. Thanks.

Usage

I installed and can debug my app without error. But lacking any usage info so i'm not seeing any UI either. How do I turn it on?

glimpse with DI

Hi,

I downloaded glimpse to use on an existing MVC 2.0 site where we replace the standard ControllerFactory with a IoC (in this instance - StructureMap).

Is there any special wiring I need to do, as I can't seem to get Glimpse to work with it out-of-the-box

Also, the Mvcmusicstore.mdf file is missing from the examples project (when downloading direct from github) not a biggy but would be cool to have it so someone can spin the example up.

Thanks, Mark

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.