0

我是 Glimpse 的新手。我的设置:MVC4、EF5、VS 2012、.NET 4.5。

我使用包管理器控制台安装了 Glimpse。输出:

PM> Install-Package Glimpse
Successfully installed 'Glimpse 1.5.0'.
Successfully added 'Glimpse 1.5.0' to MyProject.Web.

PM> Install-Package Glimpse.AspNet
Attempting to resolve dependency 'Glimpse (= 1.4.2)'.
Successfully installed 'Glimpse.AspNet 1.3.1'.
Successfully added 'Glimpse.AspNet 1.3.1' to MyProject.Web.

PM> Install-Package Glimpse.Mvc4
Attempting to resolve dependency 'Glimpse.AspNet (= 1.3.0)'.
Attempting to resolve dependency 'Glimpse (= 1.4.2)'.
Successfully installed 'Glimpse.Mvc4 1.3.2'.
Successfully added 'Glimpse.Mvc4 1.3.2' to MyProject.Web.

PM> Install-Package Glimpse.Ado
Attempting to resolve dependency 'Glimpse (= 1.4.0)'.
Successfully installed 'Glimpse.Ado 1.4.1'.
Successfully added 'Glimpse.Ado 1.4.1' to MyProject.Web.

PM> Install-Package Glimpse.EF5
Attempting to resolve dependency 'Glimpse.Ado (= 1.4.1)'.
Attempting to resolve dependency 'Glimpse (= 1.4.0)'.
Successfully installed 'Glimpse.EF5 1.3.1'.
Successfully added 'Glimpse.EF5 1.3.1' to MyProject.Web.

浏览至:

http://localhost/glimpse.axd

给出这个结果:

Registered Tabs:
 Glimpse.Ado (1.4.1)
  SQL - Glimpse.Ado.Tab.SQL - EndRequest
 Glimpse.AspNet (1.3.1)
  Configuration - Glimpse.AspNet.Tab.Configuration - EndRequest
  Environment - Glimpse.AspNet.Tab.Environment - EndRequest
  Request - Glimpse.AspNet.Tab.Request - EndRequest
  Routes - Glimpse.AspNet.Tab.Routes - EndRequest
  Server - Glimpse.AspNet.Tab.Server - EndRequest
  Session - Glimpse.AspNet.Tab.Session - EndSessionAccess
 Glimpse (1.5.0)
  Timeline - Glimpse.Core.Tab.Timeline - EndRequest
  Trace - Glimpse.Core.Tab.Trace - EndRequest

Runtime Policies:
 Glimpse.AspNet (1.3.1)
  Glimpse.AspNet.Policy.LocalPolicy - BeginRequest *This policy means that Glimpse won't run remotely.*
 Glimpse (1.5.0)
  Glimpse.Core.Policy.AjaxPolicy - BeginRequest
  Glimpse.Core.Policy.ContentTypePolicy - EndRequest
  Glimpse.Core.Policy.ControlCookiePolicy - BeginRequest
  Glimpse.Core.Policy.GlimpseResourcePolicy - ExecuteResource
  Glimpse.Core.Policy.StatusCodePolicy - EndRequest
  Glimpse.Core.Policy.UriPolicy - BeginRequest

Detailed Settings:

Inspectors:
 Glimpse.Ado (1.4.1)
  Glimpse.Ado.Inspector.AdoInspector
 Glimpse.AspNet (1.3.1)
  Glimpse.AspNet.Inspector.RoutesInspector
 Glimpse (1.5.0)
  Glimpse.Core.Inspector.TraceInspector
 Glimpse.EF5 (1.3.1)
  Glimpse.EF.Inspector.EntityFrameworkInspector

Resources:
 Glimpse (1.5.0)
  glimpse_ajax - Glimpse.Core.Resource.AjaxResource - parentRequestId (True), hash (False), callback (False)
  glimpse_client - Glimpse.Core.Resource.ClientResource - hash (False)
  glimpse_config - Glimpse.Core.Resource.ConfigurationResource -
  glimpse_history - Glimpse.Core.Resource.HistoryResource - top (False), hash (False)
  glimpse_logo - Glimpse.Core.Resource.LogoResource - hash (False)
  glimpse_metadata - Glimpse.Core.Resource.MetadataResource - hash (False), callback (False)
  glimpse_popup - Glimpse.Core.Resource.PopupResource - requestId (True), hash (False)
  glimpse_request - Glimpse.Core.Resource.RequestResource - requestId (True), hash (False), callback (False)
  glimpse_sprite - Glimpse.Core.Resource.SpriteResource - hash (False)
  glimpse_version_check - Glimpse.Core.Resource.VersionCheckResource - hash (False), stamp (True), callback (False)

Client Scripts:
 Glimpse (1.5.0)
  Glimpse.Core.ClientScript.Client - ClientInterfaceScript
  Glimpse.Core.ClientScript.Data - RequestDataScript
  Glimpse.Core.ClientScript.Metadata - RequestMetadataScript

Framework Provider: Glimpse.AspNet.AspNetFrameworkProvider
Html Encoder: Glimpse.Core.Extensibility.AntiXssEncoder
Logger: Glimpse.Core.Extensibility.NLogLogger
Persistence Store: Glimpse.Core.Framework.ApplicationPersistenceStore
Resource Endpoint: Glimpse.AspNet.HttpHandlerEndpointConfiguration
Serializer: Glimpse.Core.Extensibility.JsonNetSerializer
Default Resource: Glimpse.Core.Resource.ConfigurationResource - glimpse_config
Default Runtime Policy: Glimpse.Core.Extensibility.RuntimePolicy
Proxy Factory: Glimpse.Core.Framework.CastleDynamicProxyFactory
Message Broker: Glimpse.Core.Extensibility.MessageBroker
Endpoint Base Uri: ~/Glimpse.axd


Registered Packages:

NOTE, doesn't represent all the glimpse dependent Nuget packages you have installed, just the ones that have registered as a Glimpse Nuget package

Glimpse.Ado - 1.4.1
Glimpse.EF5 - 1.3.1
Glimpse - 1.5.0
Glimpse.AspNet - 1.3.1
Glimpse.Mvc4 - 1.3.2 <--- was missing earlier, but after clearing 
                          temporary asp.net files, this appeared.

我可以在浏览器上看到 Glimpse 图标,并且可以看到以下带有数据的选项卡:

  • 配置
  • 环境
  • 要求
  • 路线
  • SQL
  • 服务器
  • 会议
  • 时间线
  • 痕迹

但是缺少与 MVC4 相关的任何选项卡。

  • 执行
  • 模型绑定
  • 元数据
  • 意见

我试图解决此问题但失败的事情。

  • 尝试使用 @Html.GlimpseClient() 因为我在日志中没有找到,但它没有帮助。即使出现此错误,我也能看到 Glimpse 图标和其他选项卡。

  • 我没有任何自定义模型绑定器,它只是一个常规的 MVC4 Web 项目。所以我不修复自定义模型绑定器将起作用。我可能错了。

  • Cleared "temporary asp.net files" and now on the "Registered Packages:" list above, I see Glimpse.Mvc4 - 1.3.2. Vola! But, I still don't see MVC related tabs.

Stuck here now. I'm enjoying data in other tabs very much, but would love to get the MVC tabs as well.

Glimpse log:

2013-07-23 02:23:50.2773 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. | 
2013-07-23 02:23:59.0328 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. | 
2013-07-23 02:24:07.2382 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. | 
2013-07-23 02:24:26.9564 | WARN | Unable to locate '</body>' with content encoding 'Unicode (UTF-8)'. Response may be compressed. | 
2013-07-23 02:24:27.4934 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. | 
2013-07-23 02:24:41.8112 | DEBUG | RuntimePolicy set to 'ModifyResponseHeaders' by IRuntimePolicy of type 'Glimpse.Core.Policy.AjaxPolicy' during RuntimeEvent 'BeginRequest'. | 
2013-07-23 02:24:42.7413 | DEBUG | RuntimePolicy set to 'ModifyResponseHeaders' by IRuntimePolicy of type 'Glimpse.Core.Policy.AjaxPolicy' during RuntimeEvent 'BeginRequest'. | 
2013-07-23 02:24:55.0730 | DEBUG | RuntimePolicy set to 'ModifyResponseHeaders' by IRuntimePolicy of type 'Glimpse.Core.Policy.AjaxPolicy' during RuntimeEvent 'BeginRequest'. | 
2013-07-23 02:24:59.2632 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. | 
2013-07-23 02:25:07.2067 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. | 
2013-07-23 02:25:12.0079 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. | 
2013-07-23 02:25:15.0111 | DEBUG | RuntimePolicy set to 'Off' by IRuntimePolicy of type 'Glimpse.Core.Policy.ContentTypePolicy' during RuntimeEvent 'EndRequest'. | 
2013-07-23 02:25:15.0111 | DEBUG | RuntimePolicy set to 'Off' by IRuntimePolicy of type 'Glimpse.Core.Policy.ContentTypePolicy' during RuntimeEvent 'EndRequest'. | 
2013-07-23 02:25:15.1161 | DEBUG | RuntimePolicy set to 'Off' by IRuntimePolicy of type 'Glimpse.Core.Policy.ContentTypePolicy' during RuntimeEvent 'EndRequest'. | 
2013-07-23 02:25:15.3461 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. | 
2013-07-23 02:25:19.7284 | DEBUG | RuntimePolicy set to 'ExecuteResourceOnly' by IRuntimePolicy of type 'Glimpse.Core.Policy.GlimpseResourcePolicy' during RuntimeEvent 'ExecuteResource'. | 
4

1 回答 1

0

Apparently it was the same issue as mentioned here

So the workaround, until the next version of Glimpse contains the fix, is by adding BuildManager.GetReferencedAssemblies() to the Application_Start method inside the Global.asax

于 2013-07-24T08:27:50.020 回答